Skip to content

[2.x] Move releases to GitHub Actions and retire Azure Pipelines - #1518

Merged
markheath merged 1 commit into
release/2.xfrom
ci/2x-github-actions-release
Nov 26, 2026
Merged

markheath merged 1 commit into
release/2.xfrom
ci/2x-github-actions-release

Conversation

@markheath

Copy link
Copy Markdown
Contributor

Summary

Gives release/2.x the same CI and release flow as main, so occasional 2.x fix drops can be published from GitHub Actions.

  • Retire Azure Pipelines: delete azure-pipelines.yml (its VSTest@2 task now fails on every PR with "Visual Studio 2015 is not found" on the current hosted image) and publish.ps1. Also removes their solution items and swaps the README's Azure badge for the build.yml badge on this branch. The GitHub Actions build workflow from [v2 branch] ci: add GitHub Actions build workflow #1415 already covers CI.
  • .github/workflows/release.yml, adapted from main's:
    • Previews: a manual dispatch from release/2.x cuts <VersionPrefix>-preview.<run_number>, or a named milestone such as rc.1.
    • Finals: a v2.* tag push cuts the final release. It checks the tag matches VersionPrefix and that RELEASE_NOTES.md has a matching section, then builds, tests, packs the nine packages (and checks the count) and pushes them via NuGet trusted publishing.
    • Same file name as main's, on purpose. GitHub only lists dispatchable workflows from the default branch but runs the copy from the branch you pick, so it shows up as "release" with release/2.x in the branch dropdown. Tag pushes run the file at the tagged commit, so v2.* tags run this one and v3.* tags run main's. As far as I know the NuGet policy is keyed on the workflow file name, so the existing one should cover this file too.
    • The GitHub Release uses --latest=false, so a 2.x release doesn't displace NAudio 3 as the repo's "Latest".
  • Lockstep version: a single <VersionPrefix>2.4.1</VersionPrefix> in Directory.Build.props replaces the <Version>2.4.0</Version> in each of the nine package projects. This is required, not just tidying: a <Version> overrides <VersionSuffix>, so previews couldn't be versioned otherwise. It's 2.4.1 because 2.4.0 has shipped and previews need to sort above it.
  • Directory.Build.targets:
    • Package validation for the package projects against the 2.4.0 baseline, so a patch release can't drop public API or a TFM.
    • Release notes: the target that loads the release notes file into PackageReleaseNotes (same as main).
    • Suppressions: two CompatibilitySuppressions.xml files record the only existing differences between TFMs, which are by-design Windows-only types that 2.4.0 already ships: Mp3FileReader in NAudio and AudioPlaybackEngine in NAudio.Extras.
  • ReleaseInstructions.md for the 2.x flow: previews, the pre-flight PR, the tag, the post-release bump.

Release notes

  • I've added a one-line bullet to the ### Unreleased section of RELEASE_NOTES.md
  • This PR doesn't need a release-notes entry (internal refactor, test-only, or docs fix)
  • Leave the release-notes entry for the maintainer to write

The packages themselves don't change, apart from the version moving to 2.4.1.

Testing

Verified locally on Linux with the .NET 10 SDK and PowerShell 7:

  • Package validation: all nine package projects build in Release, and baseline validation passes against 2.4.0. To confirm it really runs, I temporarily made BiQuadFilter internal and the build failed with CP0001 ... exists on [Baseline] ... but not on ....
  • Version script, extracted from the workflow and run under pwsh. Dispatch gives 2.4.1-preview.42, milestone=rc.1 gives 2.4.1-rc.1, a v2.4.1 tag gives a final, and a v2.4.2 tag fails with the mismatch error.
  • Release-notes extraction: an empty ### Unreleased gives empty notes (guarded here; main's copy has a reversed-range edge case with an empty section). A missing ### 2.4.1 fails as it should, and the ### 2.4.0 section extracts correctly.
  • Build then pack with VersionSuffix=preview.42 and a notes file: the nuspec has <version>2.4.1-preview.42</version>, the release notes, and dependencies on NAudio.Core 2.4.1-preview.42.
  • Non-package projects: NAudioTests still builds.

Can't be checked from a PR (not yet run):

  • The NuGet trusted-publishing push and the GitHub Release step. The first real check is a preview dispatch from release/2.x after this merges.
  • That the NuGet trusted-publishing account owns NAudio.Uap. It's the one package main never pushes.

Manual follow-ups (repo/Azure settings)

  • Uninstall the Azure Pipelines GitHub app and disable the pipeline in Azure DevOps. That removes the Azure check from PRs on both branches (it shows "neutral" on main). See "Retiring Azure DevOps" in Docs/Architecture/ReleaseStrategy.md on main.

Generated by Claude Code

The Azure pipeline on release/2.x now fails on every PR (its VSTest
task can't find Visual Studio on the current hosted image), and the
GitHub Actions build added in #1415 already covers it. Releases still
went out through publish.ps1 with an API key.

- Delete azure-pipelines.yml and publish.ps1 (and their solution items),
  and swap the README's Azure badge for the GitHub Actions one.
- Add .github/workflows/release.yml, adapted from main's: manual
  dispatch from release/2.x cuts <VersionPrefix>-preview.N (or a named
  milestone), a v2.* tag cuts the final release. Packages are pushed
  with NuGet trusted publishing. It has the same file name as main's so
  it appears in the Actions tab and shares the NuGet policy. The GitHub
  Release is created with --latest=false so NAudio 3 stays "Latest".
- Centralise the lockstep version as <VersionPrefix> in
  Directory.Build.props (bumped to 2.4.1, the next patch) instead of a
  <Version> in each of the nine package projects. A <Version> overrides
  <VersionSuffix>, so previews couldn't be versioned otherwise.
- Add Directory.Build.targets: package validation for the package
  projects against the 2.4.0 baseline, so a patch release can't drop
  public API, plus the target that loads the release notes file into
  PackageReleaseNotes. CompatibilitySuppressions.xml files record the
  two by-design Windows-only API differences between TFMs that 2.4.0
  already shipped (Mp3FileReader in NAudio, AudioPlaybackEngine in
  NAudio.Extras).
- Add ReleaseInstructions.md describing the 2.x release flow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FffhFbNE3FjRzf35ztiVkA
@markheath markheath added the release-notes-skip Exclude from the auto-generated changelog label Nov 26, 2026 — with Claude
@markheath
markheath merged commit 1d66ea5 into release/2.x Nov 26, 2026
2 checks passed
@markheath
markheath deleted the ci/2x-github-actions-release branch November 26, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes-skip Exclude from the auto-generated changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant