diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 7325786..395c2e1 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -85,7 +85,9 @@ jobs: run: | v="${{ steps.bump.outputs.version }}" # Body = this version's section from CHANGELOG.md (fallback to a stub). - body=$(awk "/^## \\[$v\\]/{f=1;next} /^## \\[/{f=0} f" CHANGELOG.md) + # Commitizen writes headings as "## vX.Y.Z (date)", so match that form + # (not the Keep-a-Changelog "## [X.Y.Z]" brackets) and stop at the next. + body=$(awk "/^## v$v/{f=1;next} /^## v/{f=0} f" CHANGELOG.md) [ -z "$body" ] && body="Release v$v" jq -n --arg tag "v$v" --arg name "v$v" --arg body "$body" \ '{tag_name:$tag, name:$name, body:$body, draft:false, prerelease:false}' \