Skip to content

Commit c4c5a33

Browse files
committed
added changelog in action release
1 parent ff4da43 commit c4c5a33

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,27 @@ jobs:
8080
echo "Prepared assets:"
8181
ls -l release_assets
8282
83+
- name: Generate Release Notes from Changelog
84+
id: generate_notes
85+
run: |
86+
# Use dpkg-parsechangelog to extract the "Changes" field from the latest entry
87+
# in the debian/changelog file. This text will be used as the body of the release.
88+
CHANGELOG_BODY=$(dpkg-parsechangelog --show-field Changes -l debian/changelog)
89+
90+
# Format for GitHub Actions multiline output
91+
echo "CHANGELOG_BODY<<EOF" >> $GITHUB_OUTPUT
92+
echo "${CHANGELOG_BODY}" >> $GITHUB_OUTPUT
93+
echo "EOF" >> $GITHUB_OUTPUT
94+
8395
- name: Create GitHub Release and Upload Artifacts
8496
uses: softprops/action-gh-release@v1
8597
with:
8698
# This will upload all files from the release_assets directory
8799
files: release_assets/*
100+
body: |
101+
## Changelog
102+
103+
${{ steps.generate_notes.outputs.CHANGELOG_BODY }}
88104
env:
89105
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90106

0 commit comments

Comments
 (0)