From ebdecf5b40b18abea8a4865018c1d2675bb7f591 Mon Sep 17 00:00:00 2001 From: byte-n Date: Fri, 14 Aug 2026 15:39:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=91=E5=B8=83=E6=B5=81=E6=B0=B4?= =?UTF-8?q?=E7=BA=BF=E5=8D=87=E7=BA=A7=20Node=2024=20=E4=BB=A5=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=20npm@12?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit npm@12.0.2 要求 Node >= 22.22.2,Node 20 下 `npm install -g npm@latest` 报 EBADENGINE。 将 publish/ci 工作流升级到 Node 24,对齐发布环境。 Co-Authored-By: Claude --- .github/workflows/ci.yml | 2 +- .github/workflows/publish.yml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 032cfed..673e7d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 24 cache: 'pnpm' - name: Install dependencies diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9f06e70..14400e9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -85,14 +85,15 @@ jobs: with: version: 10.30.1 + # 注意:npm@latest(12.x)要求 Node >= 22.22.2,Node 20 无法安装,故升级到 Node 24 - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 24 registry-url: 'https://registry.npmjs.org' cache: 'pnpm' - # Trusted Publishing 需要 npm CLI >= 11.5.1(Node 20 自带的 npm 版本过低) + # Trusted Publishing 需要 npm CLI >= 11.5.1 - name: Upgrade npm CLI for Trusted Publishing run: npm install -g npm@latest