From fd7559d5a233ac9b9c59d5df036e3ea392a1b956 Mon Sep 17 00:00:00 2001 From: Nathan Drezner Date: Thu, 16 Jul 2026 11:37:36 -0400 Subject: [PATCH] Fix npm publish: bump Node to 24 and pin npm to 11.x The trusted-publishing upgrade step ran npm install -g npm@latest, which now resolves to npm 12.x. npm 12 requires Node >= 22.22/24.15, but the job runs Node 20, so the step fails with EBADENGINE before publish. Bump the job to Node 24 (also clears the Node 20 deprecation warning) and pin the upgrade to the 11.x line, which satisfies the npm >= 11.5.1 requirement for trusted publishing. --- .github/workflows/npm-publish.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index e09042a3..9d90b908 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -24,12 +24,13 @@ jobs: steps: - uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: '24.x' registry-url: 'https://registry.npmjs.org' - name: Upgrade npm for trusted publishing - # Trusted publishing (OIDC) requires npm >= 11.5.1, newer than the - # version bundled with Node 20. - run: npm install -g npm@latest + # Trusted publishing (OIDC) requires npm >= 11.5.1. Pin to the 11.x + # line: npm@latest is now 12.x, which requires a newer Node than the + # runner provides (EBADENGINE). + run: npm install -g npm@11 shell: bash - name: Download npm package uses: actions/download-artifact@v4