From d6d142c35fe0a67af5c2d54165e186e6c3472a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ACT=E4=B8=B6=E6=B5=81=E6=98=9F=E9=9B=A8?= <1340145680@qq.com> Date: Sun, 5 Apr 2026 23:20:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0mac=20inter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/debug.yml | 20 ++++++-------------- electron-builder.yml | 3 +++ 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index 29af43e..7d94f8a 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -16,17 +16,8 @@ env: jobs: # ==================== Windows 构建 ==================== build-Windows: - strategy: - fail-fast: false - matrix: - include: - - arch: x64 - name: x64 - - arch: arm64 - name: ARM64 - runs-on: windows-latest - name: 构建 Windows (${{ matrix.name }}) + name: 构建 Windows steps: - name: 检出代码 @@ -39,8 +30,6 @@ jobs: - name: 安装依赖 run: yarn install --frozen-lockfile - env: - npm_config_arch: ${{ matrix.arch }} - name: 打包 Windows 安装程序 run: yarn dist:win @@ -50,7 +39,7 @@ jobs: - name: 上传构建产物 uses: actions/upload-artifact@v4 with: - name: windows-${{ matrix.arch }} + name: windows path: dist/*.exe retention-days: 7 @@ -85,7 +74,10 @@ jobs: npm_config_arch: ${{ matrix.arch }} - name: 安装目标平台 sharp - run: npm install --os=darwin --cpu=${{ matrix.arch }} sharp + if: matrix.arch == 'x64' + run: | + yarn add --ignore-scripts @img/sharp-darwin-x64 + ls node_modules/@img/ - name: 打包 macOS 安装程序 run: yarn dist:mac --${{ matrix.arch }} diff --git a/electron-builder.yml b/electron-builder.yml index cf57482..5b582c5 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -37,6 +37,9 @@ extraResources: win: target: - target: nsis + arch: + - x64 + - arm64 icon: ./scripts/logo.ico nsis: