mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-13 11:39:45 +08:00
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:
11
.github/workflows/build.yml
vendored
11
.github/workflows/build.yml
vendored
@@ -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: |
|
||||
|
||||
Reference in New Issue
Block a user