ci: pin release changelog to the previous stable tag - #22
Merged
Conversation
gh's --generate-notes was left to auto-select the changelog start point, and on v0.4.6 it reached back to v0.4.2 (listing #18–#21) instead of v0.4.5..v0.4.6. - checkout with fetch-depth: 0 + fetch-tags so all tags are available in CI (shallow checkout has none, which is what defeated start-tag detection). - Compute the previous stable v* tag (excluding the current version and any -beta/-alpha/-rc/-pre) and pass it as --notes-start-tag, so the auto-generated changelog covers exactly the commits in this release. 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.
Problem
The 0.4.6 release changelog listed #18–#21 with
Full Changelog: v0.4.2...v0.4.6, instead ofjust #21 (
v0.4.5...v0.4.6).Cause: the release workflow ran
gh release create --generate-noteswithout an explicitstart tag, so GitHub auto-selected the changelog starting point and reached back to v0.4.2. This
was compounded by
actions/checkout@v4doing a shallow clone with no tags, so nothing in CIcould anchor the range.
(The tags themselves are fine — v0.4.2→v0.4.6 map 1:1 to commits in order; only the changelog
range selection was wrong.)
Fix
actions/checkoutwithfetch-depth: 0+fetch-tags: trueso all tags are present in CI.v*tag (excluding the current version and any-beta/-alpha/-rc/-pre) and pass it as--notes-start-tag, so each release's changelog coversexactly its own commits.
The already-published 0.4.6 notes were regenerated out-of-band (via the generate-notes API with
previous_tag_name=v0.4.5); this change prevents the issue for all future releases.🤖 Generated with Claude Code