first-commit
ci / Validate workspace (push) Has been cancelled
landing-page-ci / Validate landing page (push) Has been cancelled
landing-page-deploy / Deploy landing page (push) Has been cancelled
github-metrics / Generate repository metrics SVG (push) Has been cancelled
refresh-contributors-wall / Refresh contributors wall cache bust (push) Waiting to run

This commit is contained in:
Zakaria
2026-05-04 14:58:14 -04:00
commit a46764fb1b
1210 changed files with 233231 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
const path = require("node:path");
module.exports = async function notarize(context) {
if (context.electronPlatformName !== "darwin") {
return;
}
const appleId = process.env.APPLE_ID;
const appleIdPassword = process.env.APPLE_APP_SPECIFIC_PASSWORD;
const teamId = process.env.APPLE_TEAM_ID;
const missing = [
["APPLE_ID", appleId],
["APPLE_APP_SPECIFIC_PASSWORD", appleIdPassword],
["APPLE_TEAM_ID", teamId],
]
.filter(([, value]) => !value)
.map(([name]) => name);
if (missing.length > 0) {
throw new Error(
`[tools-pack notarize] missing required Apple notarization env: ${missing.join(", ")}`,
);
}
const productFilename = context.packager.appInfo.productFilename;
const appPath = path.join(context.appOutDir, `${productFilename}.app`);
const { notarize } = await import("@electron/notarize");
await notarize({
appPath,
appleId,
appleIdPassword,
teamId,
});
};