Skip to content

Commit

Permalink
updated electron notarize logic
Browse files Browse the repository at this point in the history
  • Loading branch information
imolorhe committed Jul 16, 2023
1 parent 256e11c commit 877e84b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ jobs:
# macOS notarization API key
API_KEY_ID: ${{ secrets.apple_api_key_id }}
API_KEY_ISSUER_ID: ${{ secrets.apple_api_key_issuer_id }}
APPLETEAMID: ${{ secrets.apple_team_id }}
- name: Upload electron builds
if: always()
uses: actions/upload-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion packages/altair-electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"uuid": "^8.3.2"
},
"devDependencies": {
"@electron/notarize": "^2.1.0",
"@jest/globals": "28.0.0",
"@playwright/test": "1.31.2",
"@types/jest": "^28.1.7",
Expand All @@ -40,7 +41,6 @@
"electron-builder": "^23.6.0",
"electron-builder-notarize": "^1.2.0",
"electron-chromedriver": "^14.0.0",
"electron-notarize": "^1.1.1",
"electron-reloader": "^1.2.1",
"eslint": "^7.3.1",
"jest": "29.4.1",
Expand Down
12 changes: 8 additions & 4 deletions packages/altair-electron/scripts/notarize.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require('dotenv').config();
const { notarize } = require('electron-notarize');
const { notarize } = require('@electron/notarize');

exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context;
Expand All @@ -11,9 +11,13 @@ exports.default = async function notarizing(context) {

console.log('Notarizing application');
await notarize({
tool: 'notarytool',
appBundleId: 'com.xkoji.altair',
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLEID,
appleIdPassword: process.env.APPLEIDPASS,
}).then((res) => console.log('Notarization completed!') || res);
// appleId: process.env.APPLEID,
// appleIdPassword: process.env.APPLEIDPASS,
appleApiKeyId: process.env.API_KEY_ID,
appleApiIssuer: process.env.API_KEY_ISSUER_ID,
teamId: process.env.APPLETEAMID,
}).then(res => console.log('Notarization completed!') || res);
};
9 changes: 9 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2173,6 +2173,15 @@
global-agent "^3.0.0"
global-tunnel-ng "^2.7.1"

"@electron/notarize@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-2.1.0.tgz#76aaec10c8687225e8d0a427cc9df67611c46ff3"
integrity sha512-Q02xem1D0sg4v437xHgmBLxI2iz/fc0D4K7fiVWHa/AnW8o7D751xyKNXgziA6HrTOme9ul1JfWN5ark8WH1xA==
dependencies:
debug "^4.1.1"
fs-extra "^9.0.1"
promise-retry "^2.0.1"

"@electron/remote@^1.1.0":
version "1.2.2"
resolved "https://registry.yarnpkg.com/@electron/remote/-/remote-1.2.2.tgz#4c390a2e669df47af973c09eec106162a296c323"
Expand Down

0 comments on commit 877e84b

Please sign in to comment.