fix(release): skip non-code macOS signing resources

Tested: bun test scripts/pr/release-workflow.test.ts
Tested: git diff --check
Tested: bun run scripts/release.ts 0.4.3 --dry
Tested: env DEBUG=electron-builder,electron-osx-sign node ./node_modules/electron-builder/out/cli/cli.js --mac zip --arm64 --publish never -c.mac.notarize=false
Tested: bun run test:package-smoke --platform macos --package-kind release --artifacts-dir desktop/build-artifacts/electron
Confidence: high
Scope-risk: narrow
This commit is contained in:
程序员阿江(Relakkes) 2026-06-17 02:13:18 +08:00
parent 7ef48d0b65
commit ee480e0cee
2 changed files with 9 additions and 0 deletions

View File

@ -44,6 +44,10 @@
"gatekeeperAssess": false,
"entitlements": "build/entitlements.mac.plist",
"entitlementsInherit": "build/entitlements.mac.inherit.plist",
"signIgnore": [
"/Contents/Frameworks/.+\\.(?:pak|bin|dat|nib)$",
"/Contents/Resources/.+\\.(?:asar|pak|bin|dat|icns|png|jpg|jpeg|gif|svg|ttf|woff|woff2)$"
],
"notarize": true
},
"win": {

View File

@ -380,6 +380,7 @@ describe('release desktop workflow', () => {
notarize?: boolean
entitlements?: string
entitlementsInherit?: string
signIgnore?: string[]
}
}
}
@ -389,6 +390,10 @@ describe('release desktop workflow', () => {
expect(desktopPackage.build.mac?.notarize).toBe(true)
expect(desktopPackage.build.mac?.entitlements).toBe('build/entitlements.mac.plist')
expect(desktopPackage.build.mac?.entitlementsInherit).toBe('build/entitlements.mac.inherit.plist')
expect(desktopPackage.build.mac?.signIgnore).toEqual([
'/Contents/Frameworks/.+\\.(?:pak|bin|dat|nib)$',
'/Contents/Resources/.+\\.(?:asar|pak|bin|dat|icns|png|jpg|jpeg|gif|svg|ttf|woff|woff2)$',
])
})
test('Windows NSIS installer lets users choose the install directory', () => {