Skip to content

Commit

Permalink
App Signing and Notarise on MacOS (#58)
Browse files Browse the repository at this point in the history
* Update forge.config.js for OSX signing and notarise

* Update image.yml for Apple Notarisation

* Update image.yml with environment macos property
  • Loading branch information
younglim authored Nov 3, 2023
1 parent a0f4c04 commit 0a8d9f4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ jobs:
env:
CI: ""
BE_TAG: "${{ vars.BE_TAG }}"
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
working-directory: ${{github.workspace}}

- name: Move and rename universal binary zip (Mac)
Expand Down
13 changes: 12 additions & 1 deletion forge.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ module.exports = {
osxUniversal: { // config options for `@electron/universal`
x64ArchFiles: "*" // replace with any relevant glob pattern
},
osxSign: {
hardenedRuntime: true,
'gatekeeper-assess': false,
},
osxNotarize: {
tool: 'notarytool',
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_PASSWORD,
teamId: process.env.APPLE_TEAM_ID
},
ignore: [
'nodejs-mac-arm64',
'nodejs-mac-x64',
Expand All @@ -19,7 +29,8 @@ module.exports = {
'hats_for_windows.iss',
'.github'
],
...(os.platform() === 'darwin' && { extraResource: ["/tmp/purple-hats-portable-mac.zip"]})
// omit portable-zip in the .app as it causes issues as more work is needed to include it for electron-forge code signing
// ...(os.platform() === 'darwin' && { extraResource: ["/tmp/purple-hats-portable-mac.zip"]})
},
rebuildConfig: {},
makers: [
Expand Down

0 comments on commit 0a8d9f4

Please sign in to comment.