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/index.js b/openfortivpn-webview-electron/index.js index 826f7d6..140bc67 100644 --- a/openfortivpn-webview-electron/index.js +++ b/openfortivpn-webview-electron/index.js @@ -137,6 +137,14 @@ app.whenReady().then(() => { label: "Clear data", click: () => { session.defaultSession.clearStorageData() }, }, + { + type: "separator", + }, + { + label: 'Quit App', + accelerator: 'CmdOrCtrl+Q', + click: () => { app.quit() }, + }, ] },{ label: "Edit", diff --git a/openfortivpn-webview-electron/package-lock.json b/openfortivpn-webview-electron/package-lock.json index 3b91975..3c2a0ba 100644 --- a/openfortivpn-webview-electron/package-lock.json +++ b/openfortivpn-webview-electron/package-lock.json @@ -1,12 +1,12 @@ { "name": "openfortivpn-webview", - "version": "1.1.2", + "version": "1.1.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "openfortivpn-webview", - "version": "1.1.2", + "version": "1.1.3", "dependencies": { "yargs": "17.4.1" }, diff --git a/openfortivpn-webview-electron/package.json b/openfortivpn-webview-electron/package.json index d88bfc8..35391a0 100644 --- a/openfortivpn-webview-electron/package.json +++ b/openfortivpn-webview-electron/package.json @@ -1,9 +1,10 @@ { "name": "openfortivpn-webview", - "version": "1.1.2", + "version": "1.1.3", "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 } } }