From 2ccf6cf939af60e1bc317d51bb8db9e98099f64e Mon Sep 17 00:00:00 2001 From: Mike Miller Date: Thu, 1 Oct 2026 11:54:39 -0700 Subject: [PATCH] ci(deploy): use .nvmrc Node and pin npm 11 The deploy job ran on Node 20 and upgraded to npm@latest. npm 12 requires Node ^22.22.2 || ^24.15.0 || >=26, so the Upgrade npm step failed with EBADENGINE and 6.0.5 never published (runs on #67 and #69). Use .nvmrc (v22), matching CI, and pin npm 11 (>= 11.5.1 for trusted publishing; supports Node ^20.17.0 || >=22.9.0). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/deploy.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8000ccf..3e51dbe 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,7 +23,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version-file: .nvmrc - name: Check version id: check @@ -51,7 +51,9 @@ jobs: - name: Upgrade npm if: steps.check.outputs.deployed == 'true' - run: npm install -g npm@latest + # Pinned: an unpinned npm@latest drifts past the runner's Node and fails with + # EBADENGINE. Trusted publishing needs npm >= 11.5.1. + run: npm install -g npm@11 - name: Publish to npm if: steps.check.outputs.deployed == 'true'