From a0db4731789ba81aa05542f1ea4059bf65f18275 Mon Sep 17 00:00:00 2001 From: PiEgg Date: Wed, 10 Dec 2025 23:27:23 +0800 Subject: [PATCH] :bug: Fix(custom): build workflow error --- .github/workflows/main.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0ba5786..770b6e8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,10 +27,16 @@ jobs: steps: - name: Check out git repository uses: actions/checkout@v4 + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 - name: Setup Node.js uses: actions/setup-node@v6 with: node-version: ${{ env.NODE_VERSION }} + cache: pnpm + cache-dependency-path: pnpm-lock.yaml - name: Clean workspace on Windows if: runner.os == 'Windows' run: | @@ -49,24 +55,24 @@ jobs: run: | rm -rf dist dist_electron node_modules ~/.cache/electron-builder ~/.cache/electron - name: Install dependencies - run: yarn install + run: pnpm install --frozen-lockfile - name: Ubuntu Update with sudo if: runner.os == 'Linux' run: sudo apt-get update - name: Build Windows x64 & ARM64 App if: runner.os == 'Windows' - run: yarn build:win || true + run: pnpm run build:win || true env: GH_TOKEN: ${{ secrets.GH_TOKEN }} - name: Build macOS x64 & ARM64 App if: runner.os == 'macOS' - run: yarn build:mac || true + run: pnpm run build:mac || true shell: bash env: GH_TOKEN: ${{ secrets.GH_TOKEN }} - name: Build Linux x64 & ARM64 App if: runner.os == 'Linux' - run: yarn build:linux || true + run: pnpm run build:linux || true shell: bash env: GH_TOKEN: ${{ secrets.GH_TOKEN }} @@ -78,7 +84,7 @@ jobs: - name: Upload to release.picgo.app if: startsWith(github.ref, 'refs/tags/v') || github.event.inputs.test_upload_dist run: | - yarn upload-dist + pnpm run upload-dist env: PICGO_ENV_S3_SECRET_ID: ${{ secrets.PICGO_ENV_S3_SECRET_ID }} PICGO_ENV_S3_SECRET_KEY: ${{ secrets.PICGO_ENV_S3_SECRET_KEY }}