mirror of
https://github.com/temetro/temetro.git
synced 2026-07-26 11:58:14 +00:00
ci: publish the CHANGELOG section as the GitHub Release body
The release workflow only set generate_release_notes, so releases carried just the auto "Full Changelog" link. Extract this version's section from CHANGELOG.md into release-notes.md and pass it via body_path (the generated link is still appended), falling back to a generic line when there's no entry. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -62,7 +62,25 @@ jobs:
|
||||
${{ env.REGISTRY_NAMESPACE }}/temetro-frontend:${{ steps.meta.outputs.version }}
|
||||
${{ env.REGISTRY_NAMESPACE }}/temetro-frontend:latest
|
||||
|
||||
# Pull this version's section out of CHANGELOG.md so the release has real,
|
||||
# human-written notes (the auto "Full Changelog" link is still appended
|
||||
# below via generate_release_notes). Falls back to a generic line if the
|
||||
# version has no CHANGELOG entry.
|
||||
- name: Extract changelog notes
|
||||
id: notes
|
||||
run: |
|
||||
version="${{ steps.meta.outputs.version }}"
|
||||
awk -v v="$version" '
|
||||
$0 ~ "^## \\[" v "\\]" {flag=1; next}
|
||||
/^## \[/ {flag=0}
|
||||
flag {print}
|
||||
' CHANGELOG.md | sed '/./,$!d' > release-notes.md
|
||||
if [ ! -s release-notes.md ]; then
|
||||
echo "Release $version. See the changelog for details." > release-notes.md
|
||||
fi
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
body_path: release-notes.md
|
||||
generate_release_notes: true
|
||||
|
||||
Reference in New Issue
Block a user