From b51e61fa4f860b9894b3a9626a8feeff6f094039 Mon Sep 17 00:00:00 2001 From: Alberto Arroyo Raygada Date: Mon, 3 Aug 2026 12:14:22 -0500 Subject: [PATCH] fix(ci): repair the publish chain so the workflow can actually run The workflow declared `tags:` as a top-level key under `on:`, which is not a valid event. GitHub rejected the file outright: every run in this repo's history failed in 0s with "workflow file issue". CI has never executed and the tests have never run on any commit. - Move `tags: ['v*']` under `push:` so tag pushes trigger the workflow - Drop the `github.event_name == 'tag'` clause; tag pushes are `push` - Point the pack matrix at the real project paths (root, not `src/`) - Use `-p:PackageVersion=` instead of the invalid `--version:` - Drop `--no-build`; the pack job runs on a fresh runner - Use folder names in the matrix; artifact names cannot contain "/" - Make `release` depend on `publish` - Rename `CI / CD` -> `CI` and switch the README badge to the file-based URL Verified locally on .NET 10.0.201: build clean, 5/5 tests passing, and every matrix project packs with the version in its filename. Co-Authored-By: Claude Opus 5 --- .github/workflows/build.yml | 24 ++++++++++++------------ README.md | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f098e5a..a421abb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,12 +1,11 @@ -name: CI / CD +name: CI on: push: branches: [main, develop] + tags: ['v*'] pull_request: branches: [main, develop] - tags: - - 'v*' env: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true @@ -59,7 +58,7 @@ jobs: name: Determine Version runs-on: ubuntu-latest needs: build-and-test - if: github.event_name == 'push' || github.event_name == 'tag' + if: github.event_name == 'push' outputs: version: ${{ steps.version.outputs.version }} is_release: ${{ steps.version.outputs.is_release }} @@ -89,11 +88,13 @@ jobs: if: needs.version.outputs.is_release == 'true' strategy: matrix: + # Folder and assembly name match, so one value drives both the csproj + # path and the artifact name (artifact names cannot contain "/"). project: - - src/BeyondNetCode.Shell.Bootstrapper/BeyondNetCode.Shell.Bootstrapper.csproj - - src/BeyondNetCode.Shell.Bootstrapper.DependencyInjection/BeyondNetCode.Shell.Bootstrapper.DependencyInjection.csproj - - src/BeyondNetCode.Shell.Bootstrapper.AutoMapper/BeyondNetCode.Shell.Bootstrapper.AutoMapper.csproj - - src/BeyondNetCode.Shell.Bootstrapper.Observability/BeyondNetCode.Shell.Bootstrapper.Observability.csproj + - BeyondNetCode.Shell.Bootstrapper + - BeyondNetCode.Shell.Bootstrapper.DependencyInjection + - BeyondNetCode.Shell.Bootstrapper.AutoMapper + - BeyondNetCode.Shell.Bootstrapper.Observability steps: - uses: actions/checkout@v4 @@ -104,10 +105,9 @@ jobs: - name: Pack run: | - dotnet pack "${{ matrix.project }}" \ + dotnet pack "${{ matrix.project }}/${{ matrix.project }}.csproj" \ -c Release \ - --version:${{ needs.version.outputs.version }} \ - --no-build \ + -p:PackageVersion=${{ needs.version.outputs.version }} \ -p:PackageOutputPath=${{ github.workspace }}/nupkgs - name: Upload artifacts @@ -150,7 +150,7 @@ jobs: release: name: Create GitHub Release runs-on: ubuntu-latest - needs: [version] + needs: [version, publish] if: needs.version.outputs.is_release == 'true' steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index 4158135..98a923e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ NuGet - Build + Build