mirror of
https://git.sanhost.net/sanasol/hytale-f2p.git
synced 2026-02-26 06:41:47 -03:00
- Add entitlements.mac.plist for hardened runtime - Add notarize.js post-sign hook for Apple notarization - Update package.json with signing config and @electron/notarize dep - Update GitHub Actions workflow with signing secrets Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
const { notarize } = require('@electron/notarize');
|
|
const path = require('path');
|
|
|
|
exports.default = async function notarizing(context) {
|
|
const { electronPlatformName, appOutDir } = context;
|
|
|
|
// Only notarize macOS builds
|
|
if (electronPlatformName !== 'darwin') {
|
|
console.log('Skipping notarization: not macOS');
|
|
return;
|
|
}
|
|
|
|
// Skip if credentials not provided (local builds)
|
|
if (!process.env.APPLE_ID || !process.env.APPLE_APP_SPECIFIC_PASSWORD || !process.env.APPLE_TEAM_ID) {
|
|
console.log('Skipping notarization: missing credentials (APPLE_ID, APPLE_APP_SPECIFIC_PASSWORD, or APPLE_TEAM_ID)');
|
|
return;
|
|
}
|
|
|
|
const appName = context.packager.appInfo.productFilename;
|
|
const appPath = path.join(appOutDir, `${appName}.app`);
|
|
|
|
console.log(`Notarizing ${appPath}...`);
|
|
|
|
try {
|
|
await notarize({
|
|
appPath,
|
|
appleId: process.env.APPLE_ID,
|
|
appleIdPassword: process.env.APPLE_APP_SPECIFIC_PASSWORD,
|
|
teamId: process.env.APPLE_TEAM_ID,
|
|
});
|
|
console.log('Notarization complete!');
|
|
} catch (error) {
|
|
console.error('Notarization failed:', error);
|
|
throw error;
|
|
}
|
|
};
|