diff --git a/.github/workflows/electron.yml b/.github/workflows/electron.yml index 5086d2a5..4768b79b 100644 --- a/.github/workflows/electron.yml +++ b/.github/workflows/electron.yml @@ -10,9 +10,16 @@ jobs: update_image: runs-on: ubuntu-latest + strategy: + matrix: + include: + - os: ubutu-latest + arch: amd64 + - os: macos-14 + arch: arm64 steps: - uses: actions/checkout@v4 - - name: Use docker + - name: Use docker uses: actions-hub/docker/cli@master env: SKIP_LOGIN: true @@ -23,7 +30,7 @@ jobs: - name: Upload image artifact uses: actions/upload-artifact@v4 with: - name: accessmod_docker_archive + name: accessmod-docker-archive-${{ matrix.arch }} path: ./electron/app/docker/accessmod-docker.tar.gz build: @@ -31,13 +38,25 @@ jobs: needs: update_image strategy: matrix: - os: [macos-latest, windows-latest, ubuntu-latest] + include: + - os: macos-14 + platform: mac + arch: arm64 + - os: macos-12 + platform: mac + arch: amd64 + - os: windows-2022 + platform: win + arch: amd64 + - os: ubuntu-22.04 + platform: linux + arch: amd64 steps: - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 with: - name: accessmod_docker_archive + name: accessmod-docker-archive-${{ matrix.arch }} path: ./electron/app/docker/ - name: Use Node.js 18.x @@ -46,18 +65,15 @@ jobs: node-version: 18.x - name: Install Dependencies + working-directory: ./electron run: yarn install - - name: Build Electron App - uses: samuelmeuli/action-electron-builder@v1 - with: - package_root: ./electron/ - args: --${{ matrix.target }} - github_token: ${{ secrets.github_token }} - release: ${{ startsWith(github.ref, 'refs/tags/v') }} + - name : Build + working-directory: ./electron + run : yarn run dist-${{ matrix.platform }}-${{ matrix.arch }} - name: Upload Artifacts uses: actions/upload-artifact@v4 with: - name: accessmod_desktop_${{ matrix.os }} + name: accessmod-desktop-${{ matrix.os }}--${{ matrix.arch }} path: ./electron/dist/* diff --git a/.github/workflows/packer.yml b/.github/workflows/packer.yml index 8ff4f2bf..6d87a343 100644 --- a/.github/workflows/packer.yml +++ b/.github/workflows/packer.yml @@ -46,5 +46,5 @@ jobs: - name: Upload OVA uses: actions/upload-artifact@v3 with: - name: accessmod_virtual_box + name: accessmod-virtualbox path: packer/_build diff --git a/electron/package.json b/electron/package.json index d36ac20c..33e65b7d 100644 --- a/electron/package.json +++ b/electron/package.json @@ -37,7 +37,12 @@ }, "scripts": { "pack": "electron-builder --dir", - "dist": "electron-builder", + "dist-mac-amd64": "electron-builder --mac --x64", + "dist-win-amd64": "electron-builder --win --x64", + "dist-linux-amd64": "electron-builder --linux --x64", + "dist-mac-arm64": "electron-builder --mac --arm64", + "dist-win-arm64": "echo 'not supported'", + "dist-linux-arm64": "echo 'not supported'", "lint": "eslint .", "start": "electron .", "start:debug": "electron --inspect-brk=9229 .",