-
Notifications
You must be signed in to change notification settings - Fork 107
/
notarize.js
30 lines (25 loc) · 965 Bytes
/
notarize.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// From https://github.com/simonw/til/blob/main/electron/sign-notarize-electron-macos.md
// Based on https://kilianvalkhof.com/2019/electron/notarizing-your-electron-application/
const {
notarize
} = require("@electron/notarize");
exports.default = async function notarizing(context) {
const {
electronPlatformName,
appOutDir
} = context;
if (electronPlatformName !== "darwin") return;
const appName = context.packager.appInfo.productFilename;
try {
await notarize({
appBundleId: "app.openbuilds.control",
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_APP_SPECIFIC_PASSWORD,
teamId: process.env.APPLE_TEAM_ID,
});
console.log("Notarization using OpenBuilds CONTROL's custom notarize.js script: successful");
} catch (error) {
console.error("Notarization using OpenBuilds CONTROL's custom notarize.js script: failed:", error);
}
};