Skip to content

Trigger release workflow on tag push - #59

Merged
marius-bughiu merged 1 commit into
mainfrom
infra/release-on-tag-push
May 1, 2026
Merged

Trigger release workflow on tag push#59
marius-bughiu merged 1 commit into
mainfrom
infra/release-on-tag-push

Conversation

@marius-bughiu

Copy link
Copy Markdown
Owner

Summary

  • release.yml now fires on push: tags: ['v*'] (with workflow_dispatch kept as a manual fallback)
  • New github-release job extracts the ## [<version>] section of CHANGELOG.md and calls gh release create with the .nupkg attached. Fails loudly if no matching CHANGELOG section exists, so a forgotten [Unreleased][X.Y.Z] bump can't ship a blank release.
  • CONTRIBUTING.md "Cutting a release" updated to describe the tag-push flow.

Why

Until now the release workflow was manual-only. Combined with merges accumulating in [Unreleased], a full release's worth of work has been sitting un-tagged. After this lands, the v1.1.0 release is just git tag -a v1.1.0 && git push --tags.

NUGET_APIKEY is unchanged. The new GH-release step uses the default GITHUB_TOKEN with explicit permissions: contents: write. No new secrets needed.

Test plan

  • Manual workflow_dispatch on this branch confirms dotnet pack still works (run via GitHub UI after merge to main, or push a throwaway v1.1.0-rc1 tag)
  • After PR Refresh README and docs for the v1.1.0 surface #58 merges, push v1.1.0 and confirm: NuGet publish succeeds, GitHub Release is created with notes from CHANGELOG, .nupkg attached

The Release workflow only ran on workflow_dispatch, so cutting a release
required clicking through the Actions UI. Now pushing a v-prefixed tag
fires the workflow end-to-end: build, pack, dotnet nuget push, and a
matching GitHub Release with notes extracted from CHANGELOG.md.

- Add `push: tags: ['v*']` trigger; keep `workflow_dispatch` as fallback.
- Add a `github-release` job (only runs on tag pushes) that extracts the
  `## [<version>]` section of CHANGELOG.md via awk and calls
  `gh release create` with the .nupkg attached. Fails loudly if no
  matching CHANGELOG section exists, so a forgotten Unreleased->[X.Y.Z]
  bump can't ship a blank release.
- Update CONTRIBUTING.md "Cutting a release" to document the tag-push
  flow and explain that workflow_dispatch is now a fallback.

NUGET_APIKEY is unchanged. The GH-release step uses the default
GITHUB_TOKEN with explicit `permissions: contents: write`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@marius-bughiu
marius-bughiu merged commit 989b2c2 into main May 1, 2026
3 checks passed
@marius-bughiu
marius-bughiu deleted the infra/release-on-tag-push branch July 24, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant