Repository navigation
[6128] macOS CD:修复 pkg 签名与公证不生效 - #4765
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
macOS CD 产出的
.pkg一直没被签名和公证过,vpk 只是打了一行告警:未签名/未公证的 pkg 会被 Gatekeeper 直接拦掉。按提示补上 Installer 身份后,CI 反而卡死到
timeout-minutes(60 分钟)被杀,pack 阶段零输出。三处原因与修复
security find-identity -p codesigning只收录 Code Signing 用途的证书,Developer ID Installer 的 EKU 是1.2.840.113635.100.4.13,会被这条策略整条滤掉,于是INSTALL_IDENTITY为空、vpk 退化到「不签 pkg」的分支。改用默认(basic)策略。OsxBuildTools.CreateInstallerPkg只用pkgbuild/productbuild,签 pkg 是productbuild --sign,从不用 productsign,且不给 productbuild 传--keychain(靠 default-keychain 定位)。之前只授权了codesign/productsign,productbuild 用私钥时会去等 SecurityAgent 授权框——headless runner 上没人点,进程就静默挂死。补上-T /usr/bin/productbuild与 partition list 里的productbuild:后 25 秒完成签名。APPLE_CERTIFICATE_P12_BASE64。验证
tag
v2026.3.8-test4触发 macOS CD(run 40441694022),25 分钟 success,beta/stable 双通道完整链路:Release 产出
MoganSTEM-v2026.3.8-rc.3-arm.pkg,spctl -a -t install通过。范围说明
只改
.github/workflows/cd_on_macos_arm64.yml。测试分支上临时注释掉的 Debian 13 / Fedora / Windows CD 的 tag 触发不在本 PR 内,保持 main 原状。