Compare commits

...

1 Commits

Author SHA1 Message Date
ONLY-yours 4cc37777a0 Revert "👷 build: don't sign macos desktop when missing sign secrets (#9379)"
This reverts commit 20ef12443d.
2025-09-24 11:50:18 +08:00
+2 -11
View File
@@ -7,7 +7,6 @@ const packageJSON = require('./package.json');
const channel = process.env.UPDATE_CHANNEL;
const arch = os.arch();
const hasAppleCertificate = Boolean(process.env.APPLE_CERTIFICATE_BASE64);
console.log(`🚄 Build Version ${packageJSON.version}, Channel: ${channel}`);
console.log(`🏗️ Building for architecture: ${arch}`);
@@ -15,13 +14,6 @@ console.log(`🏗️ Building for architecture: ${arch}`);
const isNightly = channel === 'nightly';
const isBeta = packageJSON.name.includes('beta');
// https://www.electron.build/code-signing-mac?utm_source=openai#how-to-disable-code-signing-during-the-build-process-on-macos
if (!hasAppleCertificate) {
// Disable auto discovery to keep electron-builder from searching unavailable signing identities
process.env.CSC_IDENTITY_AUTO_DISCOVERY = 'false';
console.log('⚠️ Apple certificate not found, macOS artifacts will be unsigned.');
}
// 根据版本类型确定协议 scheme
const getProtocolScheme = () => {
if (isNightly) return 'lobehub-nightly';
@@ -95,9 +87,8 @@ const config = {
NSMicrophoneUsageDescription: "Application requests access to the device's microphone.",
},
gatekeeperAssess: false,
hardenedRuntime: hasAppleCertificate,
notarize: hasAppleCertificate,
...(hasAppleCertificate ? {} : { identity: null }),
hardenedRuntime: true,
notarize: true,
target:
// 降低构建时间,nightly 只打 dmg
// 根据当前机器架构只构建对应架构的包