Skip to content

Commit 8cc3472

Browse files
mabry1985Josh Mabryclaude
authored
fix(ci): set release body from the action's notes output, not out-file (#45)
The first cut (v0.18.0) posted to Discord fine but left the GitHub release body as the placeholder: release-tools@v1 doesn't accept the `out-file` input (warned "Unexpected input(s) 'out-file'"), so no file was written. The action DOES expose the generated markdown as the `notes` step output ("Wrote notes + highlights to $GITHUB_OUTPUT"). Capture it via id:notes and write the body from steps.notes.outputs.notes. Future releases now set the body automatically; v0.18.0's body was filled in by hand. Co-authored-by: Josh Mabry <artificialcitizens@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent ad18484 commit 8cc3472

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,25 @@ jobs:
6565
--notes "Generating release notes…"
6666
6767
- name: Generate notes + post to Discord
68+
id: notes
6869
if: steps.v.outputs.exists == 'false'
6970
uses: protoLabsAI/release-tools@v1
7071
with:
7172
version: ${{ steps.v.outputs.tag }}
7273
previous-version: ${{ steps.v.outputs.prev }}
73-
out-file: .release-notes.md
7474
env:
7575
GATEWAY_API_KEY: ${{ secrets.GATEWAY_API_KEY }}
7676
DISCORD_RELEASE_WEBHOOK: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
7777

7878
- name: Set the GitHub release body to the generated notes
79-
if: steps.v.outputs.exists == 'false'
79+
if: steps.v.outputs.exists == 'false' && steps.notes.outputs.notes != ''
8080
env:
8181
GH_TOKEN: ${{ secrets.GH_PAT || secrets.GITHUB_TOKEN }}
82+
NOTES: ${{ steps.notes.outputs.notes }}
8283
run: |
83-
if [ -s .release-notes.md ]; then
84-
gh release edit "${{ steps.v.outputs.tag }}" --notes-file .release-notes.md
85-
else
86-
echo "::warning::no notes file produced — leaving the placeholder release body."
87-
fi
84+
# The action exposes the generated markdown as the `notes` step output (it
85+
# logs "Wrote notes + highlights to $GITHUB_OUTPUT"); the `out-file` input is
86+
# NOT supported at @v1. Write the output to a file and set the body from it —
87+
# safe for multi-line content.
88+
printf '%s' "$NOTES" > .release-notes.md
89+
gh release edit "${{ steps.v.outputs.tag }}" --notes-file .release-notes.md

0 commit comments

Comments
 (0)