feat: add dynamic changelog bullet points to GitHub release notes
Parse feat/fix commits since previous tag and render them as 'What's New' and 'Bug Fixes' sections in the release body. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -99,6 +99,29 @@ jobs:
|
||||
APK=$(ls artifacts/postiz-mobile/dist/*.apk | sort | tail -1)
|
||||
echo "path=$APK" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Generate changelog
|
||||
id: changelog
|
||||
run: |
|
||||
PREV_TAG=$(git tag --sort=-version:refname | grep -v "^${{ github.ref_name }}$" | head -1)
|
||||
echo "Previous tag: $PREV_TAG"
|
||||
|
||||
FEATS=$(git log "${PREV_TAG}..HEAD" --pretty=format:"%s" --no-merges \
|
||||
| grep -E "^feat(\([^)]+\))?: " \
|
||||
| sed -E 's/^feat(\([^)]+\))?: //' \
|
||||
| sed 's/^/- /')
|
||||
|
||||
FIXES=$(git log "${PREV_TAG}..HEAD" --pretty=format:"%s" --no-merges \
|
||||
| grep -E "^fix(\([^)]+\))?: " \
|
||||
| sed -E 's/^fix(\([^)]+\))?: //' \
|
||||
| sed 's/^/- /')
|
||||
|
||||
{
|
||||
echo "changelog<<CEOF"
|
||||
[ -n "$FEATS" ] && printf "### What's New\n%s\n\n" "$FEATS"
|
||||
[ -n "$FIXES" ] && printf "### Bug Fixes\n%s\n\n" "$FIXES"
|
||||
echo "CEOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
@@ -106,8 +129,7 @@ jobs:
|
||||
body: |
|
||||
## Postiz Mobile ${{ github.ref_name }}
|
||||
|
||||
Signed APK for Android — direct install (sideload).
|
||||
|
||||
${{ steps.changelog.outputs.changelog }}
|
||||
### Installation
|
||||
1. Enable "Unknown sources" on the device
|
||||
2. Transfer the APK to the device and open it to install
|
||||
|
||||
Reference in New Issue
Block a user