ci(release): build the GitHub Release body from the CHANGELOG section#27
Merged
Conversation
The release job used generate_release_notes: true alone — GitHub's bare auto PR-list — so every release shipped thin notes until someone hand-patched the body with the curated CHANGELOG section. Add a step that extracts the "## [<version>]" section (awk between the tag's heading and the next "## [") into body_path; keep generate_release_notes so GitHub's "What's Changed" PR list + full-changelog link append below the curated notes. Falls back to auto-notes with a ::warning:: if the tag has no CHANGELOG entry. Closes the long-standing 'auto-populate release body from CHANGELOG' roadmap item. Takes effect next release (v0.5.0's notes were set by hand).
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.
Problem
The
releasejob (release.yml) created the GitHub Release withgenerate_release_notes: trueonly — GitHub's bare auto PR-list — and never readCHANGELOG.md. So every release shipped thin notes until someone hand-patched the body with the curated## [X.Y.Z]section. (v0.5.0 only looked right because I set it by hand during the ship.)Fix
Add an Extract release notes from CHANGELOG step that pulls the section between the tag's
## [<version>]heading and the next## [(validated locally against the 106-line 0.4.0 section — all 5 subsections, no truncation), and feed it asbody_path. Keepgenerate_release_notes: trueso GitHub appends its "What's Changed" PR list + full-changelog link below the curated notes — best of both.Falls back to auto-notes with a
::warning::if the tag has no CHANGELOG entry.Notes
ci.ymlonly runs on branch pushes.yaml.safe_load).