Refactor release notes handling in build workflow; create release notes file and remove changelog generation steps
This commit is contained in:
@@ -48,28 +48,20 @@ jobs:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: ${{ github.ref }}
|
||||
|
||||
- name: Add release notes to environment
|
||||
id: add_release_notes
|
||||
- name: Create release notes
|
||||
run: |
|
||||
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
|
||||
echo "${{ github.event.inputs.release_notes }}" >> $GITHUB_ENV
|
||||
echo "EOF" >> $GITHUB_ENV
|
||||
mkdir release_notes
|
||||
echo -e "${{ inputs.release_notes }}" >> release_notes/release_notes.md
|
||||
echo "Release notes:"
|
||||
cat release_notes/release_notes.md
|
||||
echo ""
|
||||
- name: Build package
|
||||
run: uv build
|
||||
- name: Publish package
|
||||
env:
|
||||
USERNAME: ${{ github.repository_owner }}
|
||||
run: uv publish --publish-url https://git.theprivateserver.de/api/packages/$USERNAME/pypi/ -t ${{ secrets.TOKEN }}
|
||||
- name: Generate changelog
|
||||
id: changelog
|
||||
uses: metcalfc/changelog-generator@v4.6.2
|
||||
with:
|
||||
myToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Get the changelog
|
||||
run: |
|
||||
cat << "EOF"
|
||||
${{ steps.changelog.outputs.changelog }}
|
||||
EOF
|
||||
|
||||
|
||||
- name: Create release
|
||||
id: create_release
|
||||
@@ -78,7 +70,7 @@ jobs:
|
||||
with:
|
||||
tag_name: ${{ env.VERSION }}
|
||||
release_name: Release ${{ env.VERSION }}
|
||||
body: ${{ steps.changelog.outputs.changelog }}
|
||||
body_path: release_notes/release_notes.md
|
||||
draft: false
|
||||
prerelease: false
|
||||
make_latest: true
|
||||
|
||||
Reference in New Issue
Block a user