From 41d77fddb22b8aa6c8c8bc0fe7b7d2eca2f4487b Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sun, 14 Jun 2026 23:13:22 +0200 Subject: [PATCH] ci(release): use the version's CHANGELOG section as release notes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The version-gated build already builds + attaches the version-stamped Linux and Windows bundles. Now the GitHub Release body is the `## []` 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) --- .github/workflows/release.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ab4d7a23..cf0e3a9a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,11 +79,26 @@ jobs: if: needs.version.outputs.fresh == 'true' runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 + - name: changelog notes for this version + shell: bash + run: | + ver="${{ needs.version.outputs.version }}" + # Pull the entries under `## []` — 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 with: { path: dist } - uses: softprops/action-gh-release@v2 with: tag_name: v${{ needs.version.outputs.version }} name: clide v${{ needs.version.outputs.version }} - files: dist/**/* - generate_release_notes: true + body_path: release-notes.md # the version's CHANGELOG section + generate_release_notes: true # + auto commit list appended + files: dist/**/* # the built versioned bundles