From 849118c3b211a484fdc98031ad80c348a567fca3 Mon Sep 17 00:00:00 2001 From: farion1231 Date: Wed, 6 Aug 2025 23:36:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20GitHub=20Actions:=20?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20pnpm=20=E6=9B=BF=E4=BB=A3=20npm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9c1688c..33c6394 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,15 +21,33 @@ jobs: uses: actions/setup-node@v4 with: node-version: '20' - cache: 'npm' + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + run_install: false + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - name: Setup pnpm cache + uses: actions/cache@v3 + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install dependencies - run: npm ci + run: pnpm install --frozen-lockfile - name: Build application run: | - npm run build - npm run dist + pnpm run build + pnpm run dist env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}