From 67d86f783428497cc7738c3183f8c60e5c366326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B5=E6=91=87=E5=B0=8F=E5=AD=90?= Date: Mon, 1 Jun 2026 10:38:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20release=20workflow?= =?UTF-8?q?=20-=20=E6=94=B9=E7=94=A8=20npm=20=E5=AE=89=E8=A3=85=20pnpm=20?= =?UTF-8?q?=E5=92=8C=20artifacts=20=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- .github/workflows/release.yml | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index da6ae28..91ff203 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,11 +10,7 @@ jobs: runs-on: macos-latest strategy: matrix: - include: - - platform: macos-arm64 - arch: arm64 - - platform: macos-x64 - arch: x64 + platform: [x64, arm64] steps: - name: Checkout @@ -27,9 +23,7 @@ jobs: cache: 'pnpm' - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: '9' + run: npm install -g pnpm@9 - name: Install Dependencies run: pnpm install @@ -38,25 +32,26 @@ jobs: run: pnpm build - name: Build DMG - run: pnpm run build:mac -- ${{ matrix.platform }} + run: pnpm run build:mac:${{ matrix.platform }} - - name: Upload Asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload DMG + uses: actions/upload-artifact@v4 with: - upload_url: ${{ env.UPLOAD_URL }} - asset_path: out/${{ matrix.platform }}/WechatExplorer-${{ env.VERSION }}-${{ matrix.platform }}.dmg - asset_name: WechatExplorer-${{ env.VERSION }}-${{ matrix.platform }}.dmg - asset_content_type: application/x-apple-diskimage + name: dmg-${{ matrix.platform }} + path: out/mac-*/WechatExplorer-*.dmg release: needs: build runs-on: ubuntu-latest steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + pattern: dmg-* + path: artifacts + - name: Create Release uses: softprops/action-gh-release@v2 with: - generate_release_notes: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + files: artifacts/**/* + generate_release_notes: true \ No newline at end of file