fix: builder

This commit is contained in:
ezequielnick 2025-06-05 10:42:35 +08:00
parent 9bf2f5159d
commit 54d197f9ce
2 changed files with 12 additions and 5 deletions

View File

@ -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: |

View File

@ -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',