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"