From 923d4bdd4874cf4a25988c315883bbc7909c1023 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 15 Sep 2026 16:32:14 +0300 Subject: [PATCH 1/3] Create GitHub releases from the changelog on tag push Releases have been cut by hand so far. Pushing a v* tag now publishes one whose notes are that version's changelog section, with the unreleased section standing in for prereleases and GitHub's generated notes as the last resort. --- .github/workflows/github-release.yml | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/github-release.yml diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml new file mode 100644 index 0000000..0fd3f9d --- /dev/null +++ b/.github/workflows/github-release.yml @@ -0,0 +1,51 @@ +name: Create GitHub Release + +on: + push: + tags: + - "v*" # Trigger when a version tag is pushed (e.g., v1.0.0) + +jobs: + create-release: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - name: Checkout Code + uses: actions/checkout@v7 + + # The release notes are the version's section of the changelog. A + # prerelease usually has no section of its own yet, so it gets the + # unreleased one. If neither has anything, fall back to GitHub's + # generated notes rather than publish an empty release. + - name: Extract the release notes from the changelog + id: notes + run: | + extract() { + awk -v heading="$1" ' + /^## / { if (found) exit; found = ($2 == heading); next } + found { print } + ' CHANGELOG.md + } + extract "[${GITHUB_REF_NAME#v}]" > release-notes.md + if ! grep -q '[^[:space:]]' release-notes.md; then + extract "[Unreleased]" > release-notes.md + fi + if grep -q '[^[:space:]]' release-notes.md; then + echo "found=true" >> "$GITHUB_OUTPUT" + else + echo "::warning::No changelog section for $GITHUB_REF_NAME, using generated notes instead." + echo "found=false" >> "$GITHUB_OUTPUT" + fi + + - name: Create GitHub Release + uses: ncipollo/release-action@v1 + with: + tag: ${{ github.ref_name }} + name: neat ${{ github.ref_name }} + prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-alpha') || contains(github.ref, '-beta') }} + bodyFile: ${{ steps.notes.outputs.found == 'true' && 'release-notes.md' || '' }} + generateReleaseNotes: ${{ steps.notes.outputs.found != 'true' }} + token: ${{ secrets.GITHUB_TOKEN }} From d68f8aa3ee017f5f98371b54b9cc0dcaeb45cdaa Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 15 Sep 2026 16:32:14 +0300 Subject: [PATCH 2/3] Let dependabot keep the GitHub Actions current --- .github/dependabot.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..3a626c3 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly From feeae0b2a2476aa4a450fa62d0dd759d6f58c3be Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 15 Sep 2026 16:32:14 +0300 Subject: [PATCH 3/3] Pin CI to current checkout and setup-emacs releases checkout@v4 still runs on Node 20, which GitHub is retiring, and setup-emacs@master picks up whatever lands upstream. Both now track a release tag that dependabot can bump. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e20705..4ab349e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,9 +20,9 @@ jobs: continue-on-error: ${{ matrix.emacs_version == 'snapshot' }} name: Emacs ${{ matrix.emacs_version }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - - uses: purcell/setup-emacs@master + - uses: purcell/setup-emacs@v8.0 with: version: ${{ matrix.emacs_version }}