From 05f609f3912d35dd15efac465cedec13de1fb33e Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Tue, 5 May 2026 11:14:32 +0800 Subject: [PATCH] Use corepack for pnpm in workflows --- .github/workflows/ci.yml | 11 +++++------ .github/workflows/publish.yml | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9ad1d0..aa39e1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,16 +15,15 @@ jobs: - name: Checkout uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 - - name: Setup pnpm - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 - with: - version: 10.28.2 - - name: Setup Node uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 with: node-version: 22 - cache: pnpm + + - name: Setup pnpm + run: | + corepack enable + corepack prepare pnpm@10.28.2 --activate - name: Install dependencies run: pnpm install --frozen-lockfile diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 56bfcdb..559114a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,18 +17,17 @@ jobs: - name: Checkout uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 - - name: Setup pnpm - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 - with: - version: 10.28.2 - - name: Setup Node uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 with: node-version: 22 - cache: pnpm registry-url: https://registry.npmjs.org/ + - name: Setup pnpm + run: | + corepack enable + corepack prepare pnpm@10.28.2 --activate + - name: Install dependencies run: pnpm install --frozen-lockfile