Use pnpm setup in release workflow

The release publishing workflow now installs pnpm via pnpm/action-setup instead of globally via npm, and applies the same improvement to the APIFox update job. This keeps the workflow consistent and avoids relying on the environment's global pnpm installation.
This commit is contained in:
手瓜一十雪 committed 2026-09-14 11:43:29 +08:00
1 parent 464bc3d4a7
commit cc8c679cff
1 file changed
+11 -2
+11 -2
View File
@@ -35,6 +35,11 @@ jobs:
uses: actions/checkout@v5 uses: actions/checkout@v5
with: with:
ref: ${{ inputs.version }} ref: ${{ inputs.version }}
- 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:
@@ -43,7 +48,6 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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 }}
@@ -414,11 +418,16 @@ jobs:
NapCat.Shell.Windows.OneKey.zip NapCat.Shell.Windows.OneKey.zip
draft: false draft: false
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Update apifox - name: Update apifox
env: env:
APIFOX_TOKEN: ${{ secrets.APIFOX_TOKEN }} APIFOX_TOKEN: ${{ secrets.APIFOX_TOKEN }}
run: | run: |
npm i -g pnpm
pnpm i --ignore-scripts pnpm i --ignore-scripts
pnpm run build:openapi pnpm run build:openapi