fix(ci): pass tag range to git-cliff so release body covers current release only #74
@ -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