fix(release): correct release notes + auto-update [Unreleased] changelog on merge#52
Merged
Conversation
…vious tag Release notes were built with `git-cliff --tag <V> --latest`, but that step runs before the tag is created. With no <V> tag yet, `--latest` selects the most recent existing tag, so each release shipped the previous version's changelog (v1.7.1 showed v1.7.0's entries). Use `--unreleased --tag <V>` instead: it selects the not-yet-tagged commits and labels the section with the new version. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds an Update Changelog workflow that runs on push to main, regenerates CHANGELOG.md via `make changelog.unreleased` (git-cliff with no tag), and commits the refreshed [Unreleased] section back. A release then promotes [Unreleased] -> [vX.Y.Z] through the existing --tag path. Loop/no-op guards: - auto-commit uses `chore(changelog): ... [skip ci]` so its own push does not re-trigger the workflow - release commit gains `[skip ci]` so a release push doesn't fire a redundant changelog run - cliff.toml skips `chore(changelog)` and `chore(release)` so neither bookkeeping commit appears as a changelog entry - concurrency group serializes rapid merges to avoid push races Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 this does
Two related fixes to the changelog/release pipeline:
1. Release notes showed the previous version (bug fix)
Release notes were generated with
git-cliff --tag <V> --latestbefore the tag is created, so--latestselected the most recent existing tag — the previous release.v1.7.1's notes displayed[v1.7.0]'s entries.Fix: use
--unreleased --tag <V>, which selects the not-yet-tagged commits and labels them with the new version (git-cliff's canonical pre-tag pattern).2. [Unreleased] section now stays current (new workflow)
Previously
CHANGELOG.mdwas only regenerated at release time, so[Unreleased]never reflected merged work. (It was even stale — missing the[v1.7.1]section.)New Update Changelog workflow (
.github/workflows/changelog.yml):mainCHANGELOG.mdviamake changelog.unreleased(git-cliffwith no tag)[Unreleased]section back to mainA release then promotes
[Unreleased]→[vX.Y.Z]via the existing--tagpath.Loop / no-op guards
chore(changelog): ... [skip ci]→ its own push doesn't re-trigger the workflow[skip ci]→ a release push doesn't fire a redundant changelog runcliff.tomlskipschore(changelog)andchore(release)→ neither bookkeeping commit appears as a changelog entryconcurrencygroup serializes rapid merges to avoid push racesCHANGELOG.mdis unchangedFlow
Verification
Reproduced against git-cliff 2.7.0:
--latest→[v1.7.1](wrong) vs--unreleased→[v9.9.9](correct)make changelog.unreleased→ correct[Unreleased]section,chore(...)commits filtered out🤖 Generated with Claude Code