diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5002458..365ba59 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -228,7 +228,7 @@ jobs: APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} CSC_LINK: ${{ secrets.CSC_LINK }} CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} - CSC_NAME: "Developer ID Application: Prometheus Advertising Corp (489PDK5LP3)" + CSC_NAME: "Prometheus Advertising Corp (489PDK5LP3)" DEBUG: "electron-builder" CSC_IDENTITY_AUTO_DISCOVERY: "false" run: | @@ -395,7 +395,7 @@ jobs: APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} CSC_LINK: ${{ secrets.CSC_LINK }} CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} - CSC_NAME: "Developer ID Application: Prometheus Advertising Corp (489PDK5LP3)" + CSC_NAME: "Prometheus Advertising Corp (489PDK5LP3)" DEBUG: "electron-builder" CSC_IDENTITY_AUTO_DISCOVERY: "false" run: | diff --git a/build/notarize.js b/build/notarize.js index 65c6c19..37f2a08 100644 --- a/build/notarize.js +++ b/build/notarize.js @@ -19,6 +19,13 @@ exports.default = async function(context) { const entitlementsPath = path.join(__dirname, 'entitlements.mac.plist'); const childEntitlementsPath = path.join(__dirname, 'entitlements.mac.child.plist'); + // 构造完整的证书名称 + const fullIdentity = identity.includes('Developer ID Application') + ? identity + : `Developer ID Application: ${identity}`; + + console.log(`使用签名身份: ${fullIdentity}`); + // 需要重新签名的框架和二进制文件(使用child entitlements) const frameworksToSign = [ 'Contents/Frameworks/Electron Framework.framework/Versions/A/Helpers/chrome_crashpad_handler', @@ -44,7 +51,7 @@ exports.default = async function(context) { try { const signCommand = [ 'codesign', - '--sign', `"${identity}"`, + '--sign', `"${fullIdentity}"`, '--force', '--verbose', '--options', 'runtime', @@ -73,7 +80,7 @@ exports.default = async function(context) { try { const signCommand = [ 'codesign', - '--sign', `"${identity}"`, + '--sign', `"${fullIdentity}"`, '--force', '--verbose', '--options', 'runtime', @@ -102,7 +109,7 @@ exports.default = async function(context) { try { const mainSignCommand = [ 'codesign', - '--sign', `"${identity}"`, + '--sign', `"${fullIdentity}"`, '--force', '--verbose', '--options', 'runtime',