From c7cba17b71ff47859455696528fec00fec4c2de6 Mon Sep 17 00:00:00 2001 From: "lixuefei.1313" Date: Tue, 28 Jul 2026 19:09:48 +0800 Subject: [PATCH] fix: pin npm for release publish --- .github/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ef69783..fe730b33 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -149,14 +149,14 @@ jobs: cache: 'npm' cache-dependency-path: './common/config/rush/pnpm-lock.yaml' - # Workaround for Node 22.22.2 regression: - # `npm install -g npm@latest` breaks npm's own dependency tree. + # Work around the Node 22.22.2 npm self-upgrade regression while keeping + # npm below v12: Rush's pnpm publish flow forwards --no-git-checks to npm, + # which npm v12 rejects as an unknown CLI config. # See: https://github.com/nodejs/node/issues/62425 - # Fix: use corepack or npx to bootstrap, then install npm@latest. - - name: Update npm (workaround for Node 22.22.2 bug) + - name: Update npm to the OIDC-compatible npm 11.5.1 run: | echo "Current npm version: $(npm --version)" - npx npm@latest install -g npm@latest + npx npm@11.5.1 install -g npm@11.5.1 echo "Updated npm version: $(npm --version)" - name: Verify OIDC requirements