Create GitHub releases automatically on version tags#71
Merged
Conversation
The release workflow now has a github-release job that runs on every v* tag push (alongside the PyPI publish job). It creates a GitHub Release with notes extracted from the version's CHANGELOG.md section, falling back to auto-generated notes when the section is missing. Non-final versions (rc/a/b/dev) are marked as pre-releases, and the job skips gracefully if the release already exists so workflow re-runs stay safe.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Added a
github-releasejob to the existing tag-triggered release workflow. On everyv*tag push (i.e. eachlets release), alongside the PyPI publish, it now creates a GitHub Release using the built-inghCLI:## [<version>]section fromCHANGELOG.md; falls back to GitHub's auto-generated notes (from merged PRs) when the section is missingX.Y.Z(e.g.1.26.0rc1) are flagged as pre-releasesdeployjob and uses the workflow's owngithub.tokenwithcontents: writescoped to the job — no new secrets requiredAlso documented the behavior in
docs/development.rstandCHANGELOG.md.Why
GitHub Releases were created manually up to v1.1.3 (2024) and abandoned since; all newer versions exist only as bare tags. This automates them so each release gets a browsable page with its changelog section.
Notes for reviewers
CHANGELOG.mdfor three representative tags:v1.25.0(final, has changelog section → notes from file),v1.26.0rc4(rc, no section → pre-release with generated notes),v1.15(old final, no section → generated notes)v1.2andv1.26.0rc4are not backfilled; this only affects future tags