From 4c5f2aa2f1e28efe434f57f14a0fec817c5c94f7 Mon Sep 17 00:00:00 2001 From: Charlie Poole Date: Sat, 5 Dec 2026 22:12:10 -0800 Subject: [PATCH 1/2] Release a tagged version from a Release workflow Adds a Release workflow, which runs the recipe's Release target when a tag is pushed, and moves to NUnit.Cake.Recipe 2.0.0-beta.6, which provides it (nunit/nunit-console#1946). Co-Authored-By: Claude Opus 5.5 --- .config/dotnet-tools.json | 7 ++++ .github/workflows/Release.yml | 61 +++++++++++++++++++++++++++++++++++ NUnit.Engine.Api.slnx | 1 + build.cake | 2 +- 4 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/Release.yml diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 63a2f0e..7f9fca1 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -9,6 +9,13 @@ ], "rollForward": false }, + "gitreleasemanager.tool": { + "version": "0.20.0", + "commands": [ + "dotnet-gitreleasemanager" + ], + "rollForward": false + }, "minver-cli": { "version": "8.0.0", "commands": [ diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml new file mode 100644 index 0000000..24c3c9d --- /dev/null +++ b/.github/workflows/Release.yml @@ -0,0 +1,61 @@ +name: Release + +# Pushing a tag releases that version. The recipe's CheckRelease task stops the +# run before anything is pushed unless the tagged commit is on main, the tag is a +# public release version (stable, or a non-fractional beta or rc), the keys are +# present and a milestone named for the version holds only closed issues. + +on: + push: + tags: + - '*' + +concurrency: + group: release-${{ github.ref }} + cancel-in-progress: false + +env: + DOTNET_NOLOGO: true # Disable the .NET logo + DOTNET_CLI_TELEMETRY_OPTOUT: true # Disable sending .NET CLI telemetry + +jobs: + Release: + name: Release + runs-on: windows-latest + + env: + MYGET_API_KEY: ${{ secrets.PUBLISH_MYGET_ORG }} + NUGET_API_KEY: ${{ secrets.PUBLISH_NUGET_ORG }} + CHOCO_API_KEY: ${{ secrets.PUBLISH_CHOCOLATEY_ORG }} + GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_CP }} + + steps: + # A full fetch includes origin/main, which CheckRelease needs to find the tagged commit. + - name: โคต๏ธ Checkout Source + uses: actions/checkout@v7 + with: + fetch-depth: 0 + + - name: ๐Ÿ› ๏ธ Setup .NET + uses: actions/setup-dotnet@v6 + with: + dotnet-version: | + 8.0.x + 9.0.x + 10.0.x + + - name: ๐Ÿ› ๏ธ Install dotnet tools + run: dotnet tool restore + + - name: ๐Ÿงช Check Release Tool Startup + run: dotnet tool run dotnet-gitreleasemanager -- showconfig --no-logo + + - name: ๐Ÿš€ Release + run: dotnet cake --target=Release --configuration=Release + + - name: ๐Ÿ’พ Upload Packages + if: always() + uses: actions/upload-artifact@v7 + with: + name: Packages + path: packages diff --git a/NUnit.Engine.Api.slnx b/NUnit.Engine.Api.slnx index 6c037cf..1ec2471 100644 --- a/NUnit.Engine.Api.slnx +++ b/NUnit.Engine.Api.slnx @@ -31,6 +31,7 @@ + diff --git a/build.cake b/build.cake index 94d411b..0a1d663 100644 --- a/build.cake +++ b/build.cake @@ -1,5 +1,5 @@ // Load the recipe -#load nuget:?package=NUnit.Cake.Recipe&version=2.0.0-beta.5 +#load nuget:?package=NUnit.Cake.Recipe&version=2.0.0-beta.6 // Comment out above line and uncomment below for local tests of recipe changes //#load ../NUnit.Cake.Recipe/recipe/*.cake From 6768ea58838a8a938d6941ea3041fdead9c9f9f8 Mon Sep 17 00:00:00 2001 From: Charlie Poole Date: Sun, 6 Dec 2026 04:05:58 -0800 Subject: [PATCH 2/2] Name release runs after their tag The Actions list now shows a release run as "Release " rather than under the tagged commit's message. The workflow's header also says to push the new tag on its own, since every pushed tag starts a run. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/Release.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 24c3c9d..ff85f41 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -1,9 +1,14 @@ name: Release +run-name: Release ${{ github.ref_name }} -# Pushing a tag releases that version. The recipe's CheckRelease task stops the -# run before anything is pushed unless the tagged commit is on main, the tag is a -# public release version (stable, or a non-fractional beta or rc), the keys are -# present and a milestone named for the version holds only closed issues. +# Pushing a tag releases that version. Push the new tag alone, with +# `git push origin `: `git push --tags` starts a release for every local tag +# that isn't on GitHub yet. +# +# The recipe's CheckRelease task stops the run before anything is pushed unless +# the tagged commit is on main, the tag is a public release version (stable, or a +# non-fractional beta or rc), the keys are present and a milestone named for the +# version holds only closed issues. on: push: