From fc1acd09fc5543bbafe64f912c33a46ed72ce362 Mon Sep 17 00:00:00 2001 From: Dom Slee Date: Thu, 11 Jun 2026 12:20:27 +1000 Subject: [PATCH 1/3] fix: fail release workflow when a NuGet push fails The 1.6.1 release pushed the top-level ForceOps pointer package but the RID package pushes failed with 403 (API key cannot create new package IDs). The multi-line pwsh step only reported the last command's exit code, so the run went green. Run the step with bash so the first failed push aborts the step before the pointer package is published. Co-Authored-By: Claude Fable 5 --- .github/workflows/release.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a8cbf0e..a77dd72 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -67,8 +67,11 @@ jobs: # RID-specific packages must be on the feed before the top-level pointer # package, so the pointer package is pushed in a second step. + # bash (-e) aborts on the first failed push; pwsh would run the next line + # anyway and report the step green even if the RID packages never made it. - name: Publish NuGet if: ${{ github.ref == 'refs/heads/main' && startsWith(github.event.head_commit.message, 'chore(release)') }} + shell: bash run: | dotnet nuget push -k ${{ secrets.NUGET_AUTH_TOKEN }} -s https://api.nuget.org/v3/index.json ForceOps/nupkg/ForceOps.win-x64.${{ steps.get_version.outputs.version }}.nupkg ForceOps/nupkg/ForceOps.any.${{ steps.get_version.outputs.version }}.nupkg ForceOps.Lib/nupkg/ForceOps.Lib.${{ steps.get_version.outputs.version }}.nupkg ForceOps.Lib/nupkg/ForceOps.Lib.${{ steps.get_version.outputs.version }}.snupkg --skip-duplicate dotnet nuget push -k ${{ secrets.NUGET_AUTH_TOKEN }} -s https://api.nuget.org/v3/index.json ForceOps/nupkg/ForceOps.${{ steps.get_version.outputs.version }}.nupkg --skip-duplicate From 40133e58c50bc597eba7b9749c1f2925650d0fe4 Mon Sep 17 00:00:00 2001 From: Dom Slee Date: Thu, 11 Jun 2026 12:28:42 +1000 Subject: [PATCH 2/3] fix: split NuGet publish into two steps instead of shell: bash A single-command step propagates the push's exit code even under pwsh, and the step boundary enforces RID-before-pointer ordering directly. Co-Authored-By: Claude Fable 5 --- .github/workflows/release.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a77dd72..b3d6873 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -66,12 +66,13 @@ jobs: tag_name: "${{ steps.get_version.outputs.version }}" # RID-specific packages must be on the feed before the top-level pointer - # package, so the pointer package is pushed in a second step. - # bash (-e) aborts on the first failed push; pwsh would run the next line - # anyway and report the step green even if the RID packages never made it. - - name: Publish NuGet + # package. Separate steps so a failed RID push fails the job before the + # pointer is published (a multi-line pwsh step only reports the last + # command's exit code, which let the broken 1.6.1 release go green). + - name: Publish NuGet (RID packages) if: ${{ github.ref == 'refs/heads/main' && startsWith(github.event.head_commit.message, 'chore(release)') }} - shell: bash - run: | - dotnet nuget push -k ${{ secrets.NUGET_AUTH_TOKEN }} -s https://api.nuget.org/v3/index.json ForceOps/nupkg/ForceOps.win-x64.${{ steps.get_version.outputs.version }}.nupkg ForceOps/nupkg/ForceOps.any.${{ steps.get_version.outputs.version }}.nupkg ForceOps.Lib/nupkg/ForceOps.Lib.${{ steps.get_version.outputs.version }}.nupkg ForceOps.Lib/nupkg/ForceOps.Lib.${{ steps.get_version.outputs.version }}.snupkg --skip-duplicate - dotnet nuget push -k ${{ secrets.NUGET_AUTH_TOKEN }} -s https://api.nuget.org/v3/index.json ForceOps/nupkg/ForceOps.${{ steps.get_version.outputs.version }}.nupkg --skip-duplicate + run: dotnet nuget push -k ${{ secrets.NUGET_AUTH_TOKEN }} -s https://api.nuget.org/v3/index.json ForceOps/nupkg/ForceOps.win-x64.${{ steps.get_version.outputs.version }}.nupkg ForceOps/nupkg/ForceOps.any.${{ steps.get_version.outputs.version }}.nupkg ForceOps.Lib/nupkg/ForceOps.Lib.${{ steps.get_version.outputs.version }}.nupkg ForceOps.Lib/nupkg/ForceOps.Lib.${{ steps.get_version.outputs.version }}.snupkg --skip-duplicate + + - name: Publish NuGet (pointer package) + if: ${{ github.ref == 'refs/heads/main' && startsWith(github.event.head_commit.message, 'chore(release)') }} + run: dotnet nuget push -k ${{ secrets.NUGET_AUTH_TOKEN }} -s https://api.nuget.org/v3/index.json ForceOps/nupkg/ForceOps.${{ steps.get_version.outputs.version }}.nupkg --skip-duplicate From cf4a2cc0fa08b088aa64267bfd47b5ab6c224b62 Mon Sep 17 00:00:00 2001 From: Dom Slee Date: Thu, 11 Jun 2026 12:49:10 +1000 Subject: [PATCH 3/3] chore: restore original concise comment Co-Authored-By: Claude Fable 5 --- .github/workflows/release.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b3d6873..5c1c508 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -66,9 +66,7 @@ jobs: tag_name: "${{ steps.get_version.outputs.version }}" # RID-specific packages must be on the feed before the top-level pointer - # package. Separate steps so a failed RID push fails the job before the - # pointer is published (a multi-line pwsh step only reports the last - # command's exit code, which let the broken 1.6.1 release go green). + # package, so the pointer package is pushed in a second step. - name: Publish NuGet (RID packages) if: ${{ github.ref == 'refs/heads/main' && startsWith(github.event.head_commit.message, 'chore(release)') }} run: dotnet nuget push -k ${{ secrets.NUGET_AUTH_TOKEN }} -s https://api.nuget.org/v3/index.json ForceOps/nupkg/ForceOps.win-x64.${{ steps.get_version.outputs.version }}.nupkg ForceOps/nupkg/ForceOps.any.${{ steps.get_version.outputs.version }}.nupkg ForceOps.Lib/nupkg/ForceOps.Lib.${{ steps.get_version.outputs.version }}.nupkg ForceOps.Lib/nupkg/ForceOps.Lib.${{ steps.get_version.outputs.version }}.snupkg --skip-duplicate