From b94f96d38f8f33b9faaf8cddf2a37381de2a11b9 Mon Sep 17 00:00:00 2001 From: Shaun Arman Date: Sat, 6 Jun 2026 21:07:04 -0500 Subject: [PATCH] fix(ci): pass tag range to git-cliff so release body covers current release only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- .gitea/workflows/auto-tag.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/auto-tag.yml b/.gitea/workflows/auto-tag.yml index 37b1bfd6..2f9264de 100644 --- a/.gitea/workflows/auto-tag.yml +++ b/.gitea/workflows/auto-tag.yml @@ -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" -- 2.45.2