From 4ddb4c6c8761f03824fc63f83f989e83753bce45 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 9 Jun 2026 10:31:01 +0800 Subject: [PATCH] chore: optimize CI pnpm setup --- .github/workflows/chromatic.yml | 11 +++++------ .github/workflows/release.yml | 12 +++++------- .github/workflows/test.yml | 11 +++++------ 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index 662385a..8b21e59 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -22,17 +22,16 @@ jobs: with: fetch-depth: 0 - - name: Install Pnpm - run: npm install -g corepack@latest --force && corepack enable - - name: Setup Node.js uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: node-version: 24.16.0 - cache: 'pnpm' + package-manager-cache: false - - name: Install dependencies - run: pnpm install + - name: Install Pnpm + uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 + with: + run_install: true - name: Build Packages run: pnpm build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5474b72..71329c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,14 +24,12 @@ jobs: uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: node-version: 24.16.0 + package-manager-cache: false - - name: Setup Pnpm - run: | - npm install -g corepack@latest --force - corepack enable - - - name: Install Dependencies - run: pnpm i + - name: Install Pnpm + uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 + with: + run_install: true - name: Build Packages run: pnpm build diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 61df771..0888e77 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,17 +23,16 @@ jobs: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - - name: Install Pnpm - run: npm install -g corepack@latest --force && corepack enable - - name: Setup Node.js uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: node-version: 24.16.0 - cache: 'pnpm' + package-manager-cache: false - - name: Install Dependencies - run: pnpm install + - name: Install Pnpm + uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 + with: + run_install: true - name: Run Test run: pnpm run build && pnpm run build-storybook