Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Release
run-name: Release ${{ github.ref_name }}

# Pushing a tag releases that version. Push the new tag alone, with
# `git push origin <tag>`: `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:
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
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
43 changes: 43 additions & 0 deletions GitReleaseManager.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# NOTE: The milestone must not contain any closed issues without one
# of the labels listed here under issue-labels-include or issue-labels-exclude.
# If no such label is found, then GRM fails with an error.

# The labels that will be used to include issues in release notes.
issue-labels-include:
- Breaking Change
- Feature
- Enhancement
- Bug
- Build
- Documentation
# The labels that will NOT be used when including issues in release notes.
issue-labels-exclude:
- Refactor
# Overrides default pluralization and header names for specific labels.
issue-labels-alias:
- name: Build
header: Build
plural: Build
- name: Documentation
header: Documentation
plural: Documentation
# Configuration values used when creating new releases
create:
include-footer: true
footer-heading:
footer-content:
footer-includes-milestone: false
include-sha-section: true
sha-section-heading: "SHA256 Hashes of the release artifacts"
sha-section-line-format: "- `{1}` `{0}`"
allow-update-to-published: false
# Configuration values used when exporting release notes
export:
include-created-date-in-title: true
created-date-string-format: MMMM dd, yyyy
perform-regex-removal: false
close:
# Whether to add comments to issues closed with the published milestone release.
use-issue-comments: true
issue-comment: |-
This issue has been resolved in version {milestone}
2 changes: 2 additions & 0 deletions NUnit.Common.slnx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Solution>
<Folder Name="/Solution Items/">
<File Path="GitReleaseManager.yaml" />
<File Path=".gitattributes" />
<File Path=".gitignore" />
<File Path="build" />
Expand All @@ -19,6 +20,7 @@
</Folder>
<Folder Name="/Solution Items/.github/workflows/">
<File Path=".github/workflows/NUnit.Common.CI.yml" />
<File Path=".github/workflows/Release.yml" />
</Folder>
<Project Path="src/NUnitCommon/nunit.common.tests/nunit.common.tests.csproj" />
<Project Path="src/NUnitCommon/nunit.common/nunit.common.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion build.cake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Load the recipe
#load nuget:?package=NUnit.Cake.Recipe&version=2.0.0-beta.5.11
#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

Expand Down