ci: pin pnpm to v9 via pnpm/action-setup
pnpm 10 exits non-zero on [ERR_PNPM_IGNORED_BUILDS] by default, which broke CI after the global pnpm version on GitHub runners bumped. Replace ad-hoc `npm i -g pnpm` calls with pnpm/action-setup@v4 pinned to version 9 across build-ci.yml, build-pr.yml, and drop the redundant Install pnpm step from pr-build-run.ts.
This commit is contained in:
3 files changed
+26
-9
No files matched your search
@@ -22,11 +22,7 @@ interface BuildStep {
|
|||||||
|
|
||||||
function getCommonSteps (): BuildStep[] {
|
function getCommonSteps (): BuildStep[] {
|
||||||
return [
|
return [
|
||||||
{
|
// pnpm 已通过 GitHub Action (pnpm/action-setup) 预安装并固定 v9, 此处无需再次安装
|
||||||
name: 'Install pnpm',
|
|
||||||
command: 'npm i -g pnpm',
|
|
||||||
errorMessage: 'Failed to install pnpm',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'Install dependencies',
|
name: 'Install dependencies',
|
||||||
command: 'pnpm i',
|
command: 'pnpm i',
|
||||||
|
|||||||
@@ -17,14 +17,17 @@ jobs:
|
|||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- name: Setup pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 9
|
||||||
|
run_install: false
|
||||||
- name: Use Node.js 20.x
|
- name: Use Node.js 20.x
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: 20.x
|
node-version: 20.x
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: pnpm i
|
||||||
npm i -g pnpm
|
|
||||||
pnpm i
|
|
||||||
- name: Type Check
|
- name: Type Check
|
||||||
run: pnpm run typecheck
|
run: pnpm run typecheck
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
@@ -50,6 +53,11 @@ jobs:
|
|||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- name: Setup pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 9
|
||||||
|
run_install: false
|
||||||
- name: Use Node.js 20.x
|
- name: Use Node.js 20.x
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
@@ -68,7 +76,6 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
NAPCAT_VERSION: ${{ env.NAPCAT_VERSION }}
|
NAPCAT_VERSION: ${{ env.NAPCAT_VERSION }}
|
||||||
run: |
|
run: |
|
||||||
npm i -g pnpm
|
|
||||||
pnpm i
|
pnpm i
|
||||||
pnpm --filter napcat-webui-frontend run build || exit 1
|
pnpm --filter napcat-webui-frontend run build || exit 1
|
||||||
pnpm run ${{ matrix.target.build_cmd }}
|
pnpm run ${{ matrix.target.build_cmd }}
|
||||||
|
|||||||
@@ -157,6 +157,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 24
|
node-version: 24
|
||||||
|
|
||||||
|
# 固定 pnpm v9 (避免 pnpm 10 对 ignored builds 默认非零退出)
|
||||||
|
- name: Setup pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 9
|
||||||
|
run_install: false
|
||||||
|
|
||||||
# 获取最新 release tag 并生成版本号
|
# 获取最新 release tag 并生成版本号
|
||||||
- name: Generate Version
|
- name: Generate Version
|
||||||
id: version
|
id: version
|
||||||
@@ -229,6 +236,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 24
|
node-version: 24
|
||||||
|
|
||||||
|
# 固定 pnpm v9 (避免 pnpm 10 对 ignored builds 默认非零退出)
|
||||||
|
- name: Setup pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 9
|
||||||
|
run_install: false
|
||||||
|
|
||||||
# 获取最新 release tag 并生成版本号
|
# 获取最新 release tag 并生成版本号
|
||||||
- name: Generate Version
|
- name: Generate Version
|
||||||
id: version
|
id: version
|
||||||
|
|||||||
Reference in new issue
Block a user