cherry-studio/scripts/notarize.js
2024-07-11 14:38:45 +08:00

23 lines
600 B
JavaScript

require('dotenv').config()
const { notarize } = require('@electron/notarize')
exports.default = async function notarizing(context) {
if (context.electronPlatformName !== 'darwin') {
return
}
const appName = context.packager.appInfo.productFilename
const notarized = await notarize({
appPath: `${context.appOutDir}/${appName}.app`,
appBundleId: 'com.kangfenmao.CherryStudio',
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_APP_SPECIFIC_PASSWORD,
teamId: process.env.APPLE_TEAM_ID
})
console.log('Notarized:', notarized)
return notarized
}