From 496c50276c2de68eadda3b787ea6f413ee8d1f05 Mon Sep 17 00:00:00 2001 From: Dan Hensby Date: Fri, 20 Nov 2026 21:42:26 +0000 Subject: [PATCH 1/2] ci: run the release job on the latest Node.js LTS The release job ran on the Node version in .nvmrc, which is 24 to match the node24 runtime of the action. The release tools follow the Node.js LTS line, and the next semantic-release major already needs Node 26.13 or later, so it could never run there. Run the release job on the latest LTS (lts/*, currently 26), set once at the top of the workflow. The action itself, its tests and its build checks still use .nvmrc. Every package in both lockfiles accepts Node 26.13.1. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 386b386..fbb0891 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,11 @@ on: permissions: contents: read +env: + # the release tools follow the latest Node.js LTS, which can be newer than the node24 that the action runs on + # (.nvmrc); the releasetools job checks them on the same version, and the release job waits for it + RELEASE_NODE_VERSION: 'lts/*' + jobs: commitlint: name: Lint commits @@ -219,7 +224,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v7 with: - node-version-file: '.nvmrc' + node-version: ${{ env.RELEASE_NODE_VERSION }} cache: 'npm' cache-dependency-path: | package-lock.json From 77f51acb2ef3d5ca13c79974f60025849cff0991 Mon Sep 17 00:00:00 2001 From: Dan Hensby Date: Fri, 20 Nov 2026 21:43:41 +0000 Subject: [PATCH 2/2] ci: check the release tools on every change The release job runs only for pushes to master, so a change that broke the release tools, such as a semantic-release update that needs a newer Node version, passed every check and failed only at the next release. Add a job that installs the release tools on the release Node version and runs `semantic-release --version`, whose CLI exits with an error when the Node version doesn't meet its engines. With semantic-release 26.0.1 on Node 24, it exits 1 with "node version >=26.13 is required". The job also rebuilds lib/ on that Node version and fails if the result differs from the committed files, because semantic-release commits the build it makes there. The release job now waits for this job. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fbb0891..11d2be5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,6 +85,41 @@ jobs: echo "::error::The built files are out of date. Run npm run build and commit the changes to lib/ and README.md." exit 1 fi + releasetools: + # the release job only runs on master, so check on every change that the release tools run on the release + # Node version, and that a build there gives the same lib/ that semantic-release will commit + name: Check release tools + runs-on: ubuntu-22.04 + timeout-minutes: 10 + steps: + - name: Checkout code + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: Setup Node.js + uses: actions/setup-node@v7 + with: + node-version: ${{ env.RELEASE_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + package-lock.json + tools/release/package-lock.json + - name: Install dependencies + run: npm clean-install --ignore-scripts + - name: Install the release tools + run: npm clean-install --ignore-scripts --prefix tools/release + - name: Check that semantic-release runs on this Node version + # the semantic-release CLI exits with an error when the Node version doesn't meet its engines + run: ./tools/release/node_modules/.bin/semantic-release --version + - name: Build files + run: npm run build + - name: Check built files + run: | + git add --intent-to-add --all + if ! git diff --exit-code --stat; then + echo "::error::A build on the release Node version gives different files from the committed ones." + exit 1 + fi test: name: Run tests runs-on: ubuntu-22.04 @@ -210,6 +245,7 @@ jobs: - commitlint - codelint - buildlint + - releasetools - test - runaction permissions: