Skip to content

Commit

Permalink
Build and release macOS binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Mazzotta committed Jan 27, 2024
1 parent 91e7acf commit 3e3f05c
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 3 deletions.
37 changes: 35 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ on:
tags: [ "v*-electron" ]

jobs:
build:
build-linux:

runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Repository checkout
Expand All @@ -26,11 +28,42 @@ 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
with:
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
20 changes: 19 additions & 1 deletion openfortivpn-webview-electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -21,6 +22,23 @@
"AppImage",
"tar.xz"
]
},
"mac": {
"mergeASARs": false,
"identity": null,
"target": [
{
"target": "dmg",
"arch": [
"x64",
"arm64",
"universal"
]
}
]
},
"dmg": {
"writeUpdateInfo": false
}
}
}

0 comments on commit 3e3f05c

Please sign in to comment.