fix(ci): pass tag range to git-cliff so release body covers current release only
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / frontend-typecheck (pull_request) Successful in 1m23s
Test / frontend-tests (pull_request) Successful in 1m24s
Test / rust-fmt-check (pull_request) Successful in 14m43s
Test / rust-clippy (pull_request) Successful in 17m58s
Test / rust-tests (pull_request) Successful in 19m40s
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / frontend-typecheck (pull_request) Successful in 1m23s
Test / frontend-tests (pull_request) Successful in 1m24s
Test / rust-fmt-check (pull_request) Successful in 14m43s
Test / rust-clippy (pull_request) Successful in 17m58s
Test / rust-tests (pull_request) Successful in 19m40s
git-cliff's --tag flag sets a version label, it does not restrict which
commits are scanned. Without a positional range argument, git-cliff walks
the entire commit history and generates every historical release section,
producing a release body that contains the full changelog.
Pass "${PREV_TAG}..${CURRENT_TAG}" as the range argument so git-cliff only
processes commits introduced in the current release. The full CHANGELOG.md
generation is unchanged (no range — intentional, it covers all tags).
This commit is contained in:
parent
f67821c0b8
commit
b94f96d38f
@ -138,8 +138,11 @@ jobs:
|
||||
PREV_TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' \
|
||||
| grep -v "^${CURRENT_TAG}$" | head -1 || echo "")
|
||||
if [ -n "$PREV_TAG" ]; then
|
||||
git-cliff --config cliff.toml --tag "$CURRENT_TAG" --strip all > /tmp/release_body.md || true
|
||||
# Generate full CHANGELOG.md from all tags
|
||||
# Range arg limits git-cliff to commits between the two tags only.
|
||||
# Without it, git-cliff walks all history and dumps every release section.
|
||||
git-cliff --config cliff.toml --tag "$CURRENT_TAG" --strip all \
|
||||
"${PREV_TAG}..${CURRENT_TAG}" > /tmp/release_body.md || true
|
||||
# Full CHANGELOG.md still covers all tags (no range — intentional)
|
||||
git-cliff --config cliff.toml --output CHANGELOG.md
|
||||
else
|
||||
echo "No previous tag found, generating from git commits"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user