add Visual C++ Redistributable to windows ARM builds for compatibility #64
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build/release Electron app | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| release: | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }} | |
| strategy: | |
| matrix: | |
| include: | |
| # macOS - builds universal binary (x64 + arm64) | |
| - os: macos-latest | |
| platform: mac | |
| arch: universal | |
| # Linux x64 | |
| - os: ubuntu-latest | |
| platform: linux | |
| arch: x64 | |
| # Windows x64 | |
| - os: windows-latest | |
| platform: windows | |
| arch: x64 | |
| # Windows ARM64 - uses native ARM64 runner | |
| - os: windows-11-arm | |
| platform: windows | |
| arch: arm64 | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v3 | |
| - name: Install Snapcraft | |
| uses: samuelmeuli/action-snapcraft@v2 | |
| if: ${{ matrix.platform == 'linux' }} | |
| - name: Install Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20 | |
| - name: Install dependencies | |
| run: npm install | |
| # macOS builds both x64 and arm64, but macos-latest is arm64 | |
| # Need to explicitly install x64 binary for the x64 build | |
| - name: Install macOS x64 native module | |
| if: ${{ matrix.platform == 'mac' }} | |
| run: npm install --save-dev @miniben90/x-win-darwin-x64 --force | |
| - name: Build | |
| run: npm run build | |
| # Windows: Build for specific architecture only | |
| - name: Run Electron Builder (Windows x64) | |
| if: ${{ matrix.platform == 'windows' && matrix.arch == 'x64' }} | |
| run: | | |
| npx electron-builder --windows --x64 --publish always | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| - name: Run Electron Builder (Windows ARM64) | |
| if: ${{ matrix.platform == 'windows' && matrix.arch == 'arm64' }} | |
| run: | | |
| npx electron-builder --windows --arm64 --publish always | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| - name: Run Electron Builder (Linux) | |
| if: ${{ matrix.platform == 'linux' }} | |
| run: | | |
| npx electron-builder --linux --publish always | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| - name: Run Electron Builder (macOS) | |
| if: ${{ matrix.platform == 'mac' }} | |
| run: | | |
| echo "$API_KEY" > apple.p8 | |
| npx electron-builder --mac --publish always | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| CSC_LINK: ${{ secrets.MAC_CERTS }} | |
| CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTS_PASSWORD }} | |
| API_KEY: ${{ secrets.API_KEY }} | |
| APPLE_API_KEY: apple.p8 | |
| APPLE_API_KEY_ID: ${{ secrets.API_KEY_ID }} | |
| APPLE_API_ISSUER: ${{ secrets.API_KEY_ISSUER_ID }} |