Skip to content

ci: auto-promote changelog on release#15

Merged
emuuu merged 1 commit into
mainfrom
ci/automate-changelog
Jun 11, 2026
Merged

ci: auto-promote changelog on release#15
emuuu merged 1 commit into
mainfrom
ci/automate-changelog

Conversation

@emuuu

@emuuu emuuu commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

Automates the changelog step of the release process so entries no longer have to be hand-promoted from [Unreleased] into a version section.

  • Adds .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.
  • Wires it into Create Release Tag (create-release-tag.yml): for a stable release it runs the script, commits CHANGELOG.md to main, then tags that commit. Prereleases skip promotion (they must not consume [Unreleased]).
  • Documents the changelog + release flow in CONTRIBUTING.md.

Behaviour

  • Stable release of X.Y.Z[Unreleased] becomes ## [X.Y.Z] - <UTC date>, links regenerated, committed to main, tag points at the finalized changelog.
  • Fails the release if [Unreleased] is empty — every release now carries notes.
  • GitHub Release notes are still auto-generated (--generate-notes); this only keeps the in-repo CHANGELOG.md tidy.

Verification

Ran the script locally against a copy of the current changelog with sample ### Added/### Fixed entries (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.

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.
@emuuu emuuu merged commit d2aa6f8 into main Jun 11, 2026
4 checks passed
@emuuu emuuu deleted the ci/automate-changelog branch June 11, 2026 12:40
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