diff --git a/scripts/notarize.js b/scripts/notarize.js index 813d6ea20..61d28024f 100644 --- a/scripts/notarize.js +++ b/scripts/notarize.js @@ -1,7 +1,7 @@ const { notarize } = require('electron-notarize'); module.exports = async function notarizing(notarizeOption) { - const { appBundleId, appPath, appleId, appleIdPassword } = notarizeOption; + const { appBundleId, appPath, appleId, appleIdPassword, teamId } = notarizeOption; const { NOTARIZE } = process.env; // noinspection EqualityComparisonWithCoercionJS @@ -10,8 +10,8 @@ module.exports = async function notarizing(notarizeOption) { return; } - if (!appleId || !appleIdPassword) { - console.log(' • APPLE_ID or APPLE_PASSWORD not found. will be skipped this process'); + if (!appleId || !appleIdPassword || !teamId) { + console.log(' • APPLE_ID or APPLE_PASSWORD or TEAM_ID not found. will be skipped this process'); return; } @@ -21,9 +21,11 @@ module.exports = async function notarizing(notarizeOption) { appleId: ${appleId}`, ); return await notarize({ + tool: 'notarytool', appBundleId, appPath, appleId, + teamId, appleIdPassword, }); }; diff --git a/scripts/notarize_app.js b/scripts/notarize_app.js index 01c1ff10f..902bba13f 100644 --- a/scripts/notarize_app.js +++ b/scripts/notarize_app.js @@ -3,7 +3,7 @@ const notarize = require('./notarize'); module.exports = async function notarizing(context) { const { appOutDir } = context; const { electronPlatformName } = context; - const { APPLE_ID, APPLE_PASSWORD } = process.env; + const { APPLE_ID, APPLE_PASSWORD, TEAM_ID } = process.env; if (electronPlatformName !== 'darwin') { return; @@ -15,6 +15,7 @@ module.exports = async function notarizing(context) { appBundleId: 'org.playentry.entry', appPath: `${appOutDir}/${appName}.app`, appleId: APPLE_ID, + teamId: TEAM_ID, appleIdPassword: APPLE_PASSWORD, }); }; diff --git a/scripts/notarize_installer.js b/scripts/notarize_installer.js index 8dc038e94..d26e5d652 100644 --- a/scripts/notarize_installer.js +++ b/scripts/notarize_installer.js @@ -3,7 +3,7 @@ const notarize = require('./notarize'); module.exports = async (context) => { const { artifactPaths } = context; - const { APPLE_ID, APPLE_PASSWORD } = process.env; + const { APPLE_ID, APPLE_PASSWORD, TEAM_ID } = process.env; return await Promise.all(artifactPaths.map(async (artifactPath) => { if (path.extname(artifactPath) === '.pkg') { @@ -11,6 +11,7 @@ module.exports = async (context) => { appBundleId: 'org.playentry.entry', appPath: artifactPath, appleId: APPLE_ID, + teamId: TEAM_ID, appleIdPassword: APPLE_PASSWORD, }); }