fix(ci): ensure release notes end with newline before heredoc delimiter

cliff.toml has trim=true which strips git-cliff's trailing newline.
When written to GITHUB_OUTPUT via heredoc, the closing delimiter was
appended to the last content line instead of its own line, causing
"Matching delimiter not found" error.

Added printf '\n' in the workflow and echo "" in generate-notes to
guarantee a newline before the heredoc closing delimiter.

Impact: Release workflow no longer fails when generating release notes.
This commit is contained in:
Julian Pawlowski 2026-04-07 15:16:03 +00:00
parent c160063067
commit bb176135f6
2 changed files with 2 additions and 0 deletions

View file

@ -249,6 +249,7 @@ jobs:
{
echo "notes<<${NOTES_DELIM}"
cat release-notes.md
printf '\n' # Ensure content ends with newline (git-cliff trim=true removes it)
echo "${NOTES_DELIM}"
} >> $GITHUB_OUTPUT

View file

@ -344,6 +344,7 @@ EOF
fi
git-cliff --config "$CLIFF_CONFIG" "${FROM_TAG}..${TO_TAG}"
echo "" # Ensure output ends with newline (cliff.toml trim=true removes trailing newline)
if [ "$CLIFF_CONFIG" = "/tmp/cliff.toml" ]; then
rm -f /tmp/cliff.toml