Build #3
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 | |
| on: | |
| workflow_dispatch: | |
| workflow_call: | |
| permissions: | |
| contents: read | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| package: | |
| name: Build ${{ matrix.platform }} ${{ matrix.arch }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: linux | |
| arch: x64 | |
| os: ubuntu-latest | |
| builder_args: --linux AppImage --x64 | |
| - platform: macos | |
| arch: x64 | |
| os: macos-15-intel | |
| builder_args: --mac dmg --x64 | |
| - platform: macos | |
| arch: arm64 | |
| os: macos-14 | |
| builder_args: --mac dmg --arm64 | |
| - platform: windows | |
| arch: x64 | |
| os: windows-latest | |
| builder_args: --win portable --x64 | |
| env: | |
| CSC_IDENTITY_AUTO_DISCOVERY: false | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install Linux native build dependencies | |
| if: matrix.platform == 'linux' | |
| run: sudo apt-get update && sudo apt-get install -y build-essential python3 make g++ | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Typecheck | |
| run: npm run typecheck | |
| - name: Test | |
| run: npm test | |
| - name: Build renderer and main | |
| run: npm run build:force | |
| - name: Package app | |
| shell: bash | |
| run: npx electron-builder ${{ matrix.builder_args }} --publish never -c.compression=maximum | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: StackDock-${{ matrix.platform }}-${{ matrix.arch }} | |
| path: | | |
| release/*.AppImage | |
| release/*.dmg | |
| release/*.exe | |
| if-no-files-found: error | |
| compression-level: 0 |