ci: use changelog file as release body for pre-releases

Tag pushes (beta/alpha) don't have a PR body, so fall back to reading
docs/changelog/3.2.md for the release notes.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
Estrella Pan
2026-01-24 06:55:26 +01:00
parent 8e10d09286
commit 82c641aba8

View File

@@ -318,13 +318,22 @@ jobs:
echo "pre_release=false" >> $GITHUB_OUTPUT
fi
- name: Read changelog
id: changelog
run: |
if [ -f docs/changelog/3.2.md ]; then
echo "body<<EOF" >> $GITHUB_OUTPUT
cat docs/changelog/3.2.md >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
fi
- name: Release
id: release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.version-info.outputs.version }}
name: ${{ steps.release-info.outputs.version }}
body: ${{ github.event.pull_request.body }}
body: ${{ github.event.pull_request.body || steps.changelog.outputs.body }}
draft: false
prerelease: ${{ steps.release-info.outputs.pre_release == 'true' }}
files: |