From d0c26eceeb8a697182e1e485216272b7e741840e Mon Sep 17 00:00:00 2001 From: Denis Demchenko Date: Mon, 26 Oct 2026 22:02:16 +0200 Subject: [PATCH] fix(ci): publish on Node 24 with npm pinned to 11.x (#643) Co-authored-by: Claude Opus 5.5 --- .github/workflows/publish.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0876484..73cc0ed 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -77,11 +77,14 @@ jobs: - uses: actions/download-artifact@v4 with: name: dist + # Same Node as the build job. Pin npm's major instead of `@latest`: + # trusted publishing needs npm >= 11.5.1, and npm 12 dropped Node 20, + # which is what broke the v2.15.0 publish. - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: "24" registry-url: "https://registry.npmjs.org" - - name: Update npm to latest (trusted publishing requires npm >= 11.5.1) - run: npm install -g npm@latest + - name: Update npm to 11.x (trusted publishing requires npm >= 11.5.1) + run: npm install -g npm@11 - name: Publish to npm run: npm publish --provenance --access public