diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b36c2ff..b82180c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,9 +5,11 @@ on: tags: [ "v*-electron" ] jobs: - build: + build-linux: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Repository checkout @@ -26,7 +28,7 @@ jobs: - name: Build the app working-directory: ./openfortivpn-webview-electron - run: npm run dist + run: npm run dist:linux - name: Release uses: softprops/action-gh-release@v1 @@ -34,3 +36,34 @@ jobs: files: | ./openfortivpn-webview-electron/dist/openfortivpn-webview-*.AppImage ./openfortivpn-webview-electron/dist/openfortivpn-webview-*.tar.xz + + build-mac: + + runs-on: macos-latest + permissions: + contents: write + + steps: + - name: Repository checkout + uses: actions/checkout@v3 + + - name: Install Node.js and npm + uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: 'npm' + cache-dependency-path: ./openfortivpn-webview-electron/package-lock.json + + - name: Install dependencies + working-directory: ./openfortivpn-webview-electron + run: npm install + + - name: Build the app + working-directory: ./openfortivpn-webview-electron + run: npm run dist:mac + + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: | + ./openfortivpn-webview-electron/dist/openfortivpn-webview-*.dmg diff --git a/openfortivpn-webview-electron/package.json b/openfortivpn-webview-electron/package.json index d88bfc8..7867100 100644 --- a/openfortivpn-webview-electron/package.json +++ b/openfortivpn-webview-electron/package.json @@ -3,7 +3,8 @@ "version": "1.1.2", "scripts": { "start": "electron index.js", - "dist": "electron-builder" + "dist:linux": "electron-builder --linux", + "dist:mac": "electron-builder --mac" }, "main": "index.js", "private": true, @@ -21,6 +22,23 @@ "AppImage", "tar.xz" ] + }, + "mac": { + "mergeASARs": false, + "identity": null, + "target": [ + { + "target": "dmg", + "arch": [ + "x64", + "arm64", + "universal" + ] + } + ] + }, + "dmg": { + "writeUpdateInfo": false } } }