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: