ci: auto-promote changelog on release#15
Merged
Merged
Conversation
Add .github/scripts/update_changelog.py and wire it into the Create Release Tag workflow: stable releases move the [Unreleased] section into a dated [version] section, regenerate the compare links, and commit that to main before tagging. Fails when [Unreleased] is empty so a release always carries notes. Prereleases skip the promotion. Document the flow in CONTRIBUTING.
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.
Summary
Automates the changelog step of the release process so entries no longer have to be hand-promoted from
[Unreleased]into a version section..github/scripts/update_changelog.py— moves the[Unreleased]entries into a dated## [version]section, leaves a fresh empty[Unreleased], and regenerates the compare links (Keep a Changelog format). Exits non-zero when there is nothing to release or the version already exists.create-release-tag.yml): for a stable release it runs the script, commitsCHANGELOG.mdtomain, then tags that commit. Prereleases skip promotion (they must not consume[Unreleased]).CONTRIBUTING.md.Behaviour
X.Y.Z→[Unreleased]becomes## [X.Y.Z] - <UTC date>, links regenerated, committed tomain, tag points at the finalized changelog.[Unreleased]is empty — every release now carries notes.--generate-notes); this only keeps the in-repoCHANGELOG.mdtidy.Verification
Ran the script locally against a copy of the current changelog with sample
### Added/### Fixedentries (promoted cleanly to a dated section with correct compare links), and confirmed it exits non-zero for an empty[Unreleased]and for a duplicate version. Workflow YAML validated.