Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,6 +19,8 @@
**`.app` 签名**需要 **Developer ID Application** 证书;**pkg 签名**(`productsign`)需要 **Developer ID Installer** 证书——两者是独立的证书类型,缺一不可:

- 只有 Application 证书 → `.app` 签名成功,但 `Sign pkg` 步骤报错 `An installer signing identity (not an application signing identity) is required`(实测 #462)
- 只有 Installer 证书 → electron-builder codesign `.app` 找不到 Application 身份 → 跳过签名 → 公证失败(#467 对称校验)
- **CI 早检**(#464/#467):Import step 会校验**双证书 + 私钥**三者齐备,任一缺失即明确报错,构建立即失败(不等到 Sign pkg/公证)
- 两个证书都要在 Apple Developer 后台生成(Certificates → 分别创建两种类型),下载安装到钥匙串后**一并导出**到 p12(`security export -t identities` 会导出全部证书+私钥对)

**检查本机已有哪些身份**:
Expand DownExpand Up@@ -52,11 +54,14 @@ security export -k ~/Library/Keychains/login.keychain-db -t identities -f pkcs12
# 用导出的 p12 更新 MACOS_SIGNING_P12_BASE64 和 MACOS_SIGNING_P12_PASSWORD(导出密码)
```

**验证 p12 含私钥**
**验证 p12 含私钥 + 双证书**(与 CI #467 检查对称,更新 Secret 前本地确认,避免一轮构建浪费)
```bash
security import 你的证书.p12 -k /tmp/test.keychain -P 密码
# 输出 "1 identity imported." → ✅ 含私钥
# 输出 "N certificates imported."(无 identity 行)→ ❌ 不含私钥,重新导出
# 双证书齐备检查(与 CI Import step 完全一致;任一为空 = 缺证书,重新导出)
security find-certificate -c "Developer ID Application" -a /tmp/test.keychain 2>/dev/null # 非空 ✅
security find-certificate -c "Developer ID Installer" -a /tmp/test.keychain 2>/dev/null # 非空 ✅
```

**更新 secret**:
Expand Down
Loading