ci(release): use the version's CHANGELOG section as release notes
The version-gated build already builds + attaches the version-stamped Linux and Windows bundles. Now the GitHub Release body is the `## [<version>]` CHANGELOG section (the cut the version-bump commit lands per the changelog discipline), with the auto-generated commit list appended — tying pubspec version, changelog, and built artifacts together in one release. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -79,11 +79,26 @@ jobs:
|
|||||||
if: needs.version.outputs.fresh == 'true'
|
if: needs.version.outputs.fresh == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: changelog notes for this version
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
ver="${{ needs.version.outputs.version }}"
|
||||||
|
# Pull the entries under `## [<version>]` — the changelog cut that the
|
||||||
|
# version-bump commit lands per the changelog discipline — as the
|
||||||
|
# release body; fall back to a one-liner if the section is absent.
|
||||||
|
awk -v ver="$ver" '
|
||||||
|
$0 ~ "^## \\[" ver "\\]" {grab=1; next}
|
||||||
|
grab && /^## \[/ {exit}
|
||||||
|
grab {print}
|
||||||
|
' CHANGELOG.md > release-notes.md
|
||||||
|
[ -s release-notes.md ] || echo "Release v$ver." > release-notes.md
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with: { path: dist }
|
with: { path: dist }
|
||||||
- uses: softprops/action-gh-release@v2
|
- uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: v${{ needs.version.outputs.version }}
|
tag_name: v${{ needs.version.outputs.version }}
|
||||||
name: clide v${{ needs.version.outputs.version }}
|
name: clide v${{ needs.version.outputs.version }}
|
||||||
files: dist/**/*
|
body_path: release-notes.md # the version's CHANGELOG section
|
||||||
generate_release_notes: true
|
generate_release_notes: true # + auto commit list appended
|
||||||
|
files: dist/**/* # the built versioned bundles
|
||||||
|
|||||||
Reference in New Issue
Block a user