From c8eb7b1b32e1ab1c021a681ac5d955109a9c65e1 Mon Sep 17 00:00:00 2001 From: weatherhog Date: Tue, 19 May 2026 14:47:31 +0200 Subject: [PATCH] fix(create-release): replace mindsers/changelog-reader-action with inline awk The upstream action is unmaintained (no release since March 2024) and still runs on Node 20, which GitHub Actions is deprecating on 2026-06-02. Inline shell has no Node runtime, so the workflow stops being exposed to future Node-deprecation cycles. The awk extractor was validated byte-for-byte against 128 historical release bodies produced by the action across 100 consumer repos. Refs: giantswarm/giantswarm#36091 --- .github/workflows/create-release.yaml | 35 ++++++++++++++++++++++++--- CHANGELOG.md | 6 +++++ 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/.github/workflows/create-release.yaml b/.github/workflows/create-release.yaml index ead94b8..0d9081c 100644 --- a/.github/workflows/create-release.yaml +++ b/.github/workflows/create-release.yaml @@ -188,10 +188,37 @@ jobs: grep -qE "version[[:space:]]*=[[:space:]]*\"$version\"" $file - name: Get Changelog Entry id: changelog_reader - uses: mindsers/changelog-reader-action@32aa5b4c155d76c94e4ec883a223c947b2f02656 # v2.2.3 - with: - version: ${{ needs.gather_facts.outputs.version }} - path: ./CHANGELOG.md + env: + VERSION: ${{ needs.gather_facts.outputs.version }} + run: | + set -euo pipefail + entry=$(awk -v ver="$VERSION" ' + /^## \[/ { + if (found) exit + if (index($0, "[" ver "]")) { found = 1; next } + } + found { + if ($0 ~ /^\[[^]]+\]:[ \t]*https?:\/\//) next + if (!started && $0 ~ /^[[:space:]]*$/) next + started = 1 + buf[++n] = $0 + } + END { + while (n > 0 && buf[n] ~ /^[[:space:]]*$/) n-- + for (i = 1; i <= n; i++) print buf[i] + } + ' ./CHANGELOG.md) + + if [ -z "$(printf %s "$entry" | tr -d '[:space:]')" ]; then + echo "::error::No changelog entry found for version $VERSION in ./CHANGELOG.md" + exit 1 + fi + + { + echo "changes<<__GHA_EOF__" + printf '%s\n' "$entry" + echo "__GHA_EOF__" + } >> "$GITHUB_OUTPUT" - name: Set up git identity run: | git config --local user.email "dev@giantswarm.io" diff --git a/CHANGELOG.md b/CHANGELOG.md index c7bdef9..ac68561 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), however this project does not use Semantic Versioning and there are no releases. Instead this file uses a date-based structure. +## 2026-05-19 + +### Changed + +- Replace `mindsers/changelog-reader-action` with an inline `awk` extractor in the `create-release` workflow. The upstream action is unmaintained and still runs on Node 20, which is being deprecated by GitHub Actions on 2026-06-02 (see [giantswarm/giantswarm#36091](https://github.com/giantswarm/giantswarm/issues/36091)). Inline shell has no Node runtime, so the workflow is no longer exposed to future Node-deprecation cycles. The replacement was validated byte-for-byte against 128 historical release bodies produced by the action across 100 consumer repos. + ## 2026-05-12 ### Added