From 1a06053669fe6f6c7d67d8f76ba5b139ab691b5e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 9 Dec 2024 11:53:03 -0700 Subject: [PATCH 1/4] Document release process --- CONTRIBUTING.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7ec56f4..52d83a8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,6 +41,29 @@ Building, testing, and packing this repository can be done by using the standard [pwsh]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell?view=powershell-6 +## Releases + +Use `nbgv tag` to create a tag for a particular commit that you mean to release. +[Learn more about `nbgv` and its `tag` and `prepare-release` commands](https://github.com/dotnet/Nerdbank.GitVersioning/blob/main/doc/nbgv-cli.md). + +Push the tag. + +### GitHub Actions + +When your repo is hosted by GitHub and you are using GitHub Actions, you should create a GitHub Release using the standard GitHub UI. +Having previously used `nbgv tag` and pushing the tag will help you identify the precise commit and name to use for this release. + +After publishing the release, the `.github\workflows\release.yml` workflow will be automatically triggered, which will: + +1. Find the most recent `.github\workflows\build.yml` GitHub workflow run of the tagged release. +1. Upload the `deployables` artifact from that workflow run to your GitHub Release. +1. If you have `NUGET_API_KEY` defined as a secret variable for your repo or org, any nuget packages in the `deployables` artifact will be pushed to nuget.org. + +### Azure Pipelines + +When your repo builds with Azure Pipelines, use the `azure-pipelines/release.yml` pipeline. +Trigger the pipeline by adding the `auto-release` tag on a run of your main `azure-pipelines.yml` pipeline. + ## Tutorial and API documentation API and hand-written docs are found under the `docfx/` directory. and are built by [docfx](https://dotnet.github.io/docfx/). From 7bb9a6c37c9cc09513b5e6c0a950e410dfb8d70e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 11 Dec 2024 10:25:36 -0700 Subject: [PATCH 2/4] Publish test results when they fail on github workflows --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5334bac..474d90c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,6 +61,7 @@ jobs: shell: pwsh - name: 📢 Publish artifacts uses: ./.github/actions/publish-artifacts + if: always() - name: 📢 Publish code coverage results to codecov.io run: ./azure-pipelines/publish-CodeCov.ps1 -CodeCovToken "${{ env.codecov_token }}" -PathToCodeCoverage "${{ runner.temp }}/_artifacts/coverageResults" -Name "${{ runner.os }} Coverage Results" -Flags "${{ runner.os }}" shell: pwsh From f6204f39ccd73fde0e4890d66f5019d467a9348a Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 13 Dec 2024 09:16:31 -0700 Subject: [PATCH 3/4] Fix push to nuget.org in github release workflow --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d6f5cc4..ed0f592 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,8 @@ jobs: shell: pwsh run: | if ('${{ secrets.NUGET_API_KEY }}') { - echo "NUGET_API_KEY_DEFINED=true" >> $GITHUB_ENV + Write-Host "NUGET_API_KEY secret detected. NuGet packages will be pushed." + echo "NUGET_API_KEY_DEFINED=true" >> $env:GITHUB_ENV } - name: 🔎 Search for build of ${{ github.ref }} From 0a42cd9afd1e40f6a5392850a5115ca5f42dfd9a Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 15 Dec 2024 20:35:38 -0700 Subject: [PATCH 4/4] Bump nbgv and Nerdbank.GitVersioning to 3.7.112 --- .config/dotnet-tools.json | 2 +- Directory.Packages.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index aaff6e7..3f79bde 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -17,7 +17,7 @@ "rollForward": false }, "nbgv": { - "version": "3.6.146", + "version": "3.7.112", "commands": [ "nbgv" ], diff --git a/Directory.Packages.props b/Directory.Packages.props index 237b3c2..1023aca 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -14,7 +14,7 @@ - +