From 96fe642175570b04f26acb2ad72caabd5c9418f9 Mon Sep 17 00:00:00 2001 From: loveuer Date: Sun, 18 Jan 2026 17:35:34 +0800 Subject: [PATCH] fix: correct pnpm setup in GitHub Actions - Use pnpm/action-setup@v2 instead of npm install -g - Add proper pnpm cache configuration - Fix 'Unable to locate executable file: pnpm' error --- .github/workflows/release.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a641cc6..5ec4b5c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,11 +44,25 @@ jobs: uses: actions/setup-node@v4 with: node-version: '20' - cache: 'pnpm' - cache-dependency-path: frontend/pnpm-lock.yaml - name: Install pnpm - run: npm install -g pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: Get pnpm store directory + id: pnpm-cache + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - name: Setup pnpm cache + uses: actions/cache@v3 + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Print build info run: |