Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,18 @@ jobs:
TAG: ${{ needs.release-plz-release.outputs.tag }}
run: |
body="$(gh release view "$TAG" --json body --jq .body)"
if grep -Fqx '## 💚 Sponsor aube' <<<"$body"; then
echo "Release notes already include the sponsor blurb; leaving them unchanged."
exit 0
fi
# Strip any pre-existing sponsor section (the canonical heading,
# the no-emoji variant communique sometimes emits, or a leftover
# from a prior workflow run) plus trailing blank lines, then
# append the canonical block. Idempotent regardless of input.
trimmed="$(printf '%s\n' "$body" | awk '
/^## .*Sponsor aube[[:space:]]*$/ { exit }
/^[[:space:]]*$/ { blanks++; next }
{ while (blanks-- > 0) print ""; blanks = 0; print }
')"

{
printf '%s\n' "$body"
printf '%s\n' "$trimmed"
cat <<'EOF'

## 💚 Sponsor aube
Expand Down
Loading