Skip to content

👾 Open Computer Use – Open-Source Alternative to Codex Computer Use

fix: resolve imported signing identity in release workflow

Leo23f840f7376a
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index a3f8b5d..d04f5b7 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -44,7 +44,7 @@ jobs:
run: |
echo "OPEN_COMPUTER_USE_CODESIGN_MODE=adhoc" >> "${GITHUB_ENV}"
- if [ -z "${OPEN_COMPUTER_USE_CODESIGN_P12_BASE64}" ] || [ -z "${OPEN_COMPUTER_USE_CODESIGN_P12_PASSWORD}" ] || [ -z "${OPEN_COMPUTER_USE_CODESIGN_IDENTITY}" ]; then
+ if [ -z "${OPEN_COMPUTER_USE_CODESIGN_P12_BASE64}" ] || [ -z "${OPEN_COMPUTER_USE_CODESIGN_P12_PASSWORD}" ]; then
echo "No Open Computer Use signing certificate configured; release artifacts will fall back to ad-hoc signing and may create install-specific macOS permission identities."
exit 0
fi
@@ -61,9 +61,17 @@ jobs:
security import "${cert_path}" -k "${keychain_path}" -P "${OPEN_COMPUTER_USE_CODESIGN_P12_PASSWORD}" -T /usr/bin/codesign -T /usr/bin/security
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "${keychain_password}" "${keychain_path}"
+ resolved_identity="$(security find-identity -v -p codesigning "${keychain_path}" | sed -n 's/.*\"\\(.*\\)\"/\\1/p' | head -n 1)"
+ if [ -z "${resolved_identity}" ]; then
+ echo "Imported signing certificate, but no usable codesigning identity was found in ${keychain_path}." >&2
+ exit 1
+ fi
+
+ echo "Resolved Open Computer Use signing identity: ${resolved_identity}"
+
{
echo "OPEN_COMPUTER_USE_CODESIGN_MODE=identity"
- echo "OPEN_COMPUTER_USE_CODESIGN_IDENTITY=${OPEN_COMPUTER_USE_CODESIGN_IDENTITY}"
+ echo "OPEN_COMPUTER_USE_CODESIGN_IDENTITY=${resolved_identity}"
echo "OPEN_COMPUTER_USE_CODESIGN_KEYCHAIN=${keychain_path}"
} >> "${GITHUB_ENV}"
diff --git a/docs/histories/2026-04/20260420-1828-fix-release-codesign-identity-resolution.md b/docs/histories/2026-04/20260420-1828-fix-release-codesign-identity-resolution.md
new file mode 100644
index 0000000..6424cda
--- /dev/null
+++ b/docs/histories/2026-04/20260420-1828-fix-release-codesign-identity-resolution.md
@@ -0,0 +1,23 @@
+## [2026-04-20 18:28] | Task: 修复 release 签名身份解析
+
+### 🤖 Execution Context
+* **Agent ID**: `codex`
+* **Base Model**: `gpt-5.4`
+* **Runtime**: `Codex CLI on macOS`
+
+### 📥 User Query
+> 提交相关改动,然后加个版本号 git tag 推送触发一波看看。
+
+### 🛠 Changes Overview
+**Scope:** `.github/workflows/`、`docs/`
+
+**Key Actions:**
+- **[CI Signing Resolution]**: 把 release workflow 的签名配置从“直接信任 repo secret 里的 identity 名”改成“导入 `.p12` 后,直接从临时 keychain 解析第一条可用 codesigning identity”,避免 runner 上出现 `codesign: no identity found`。
+- **[Failure Recording]**: 新增 history,记录 `v0.1.15` 首次 tag push 时 `package-npm` 在 `Build npm release artifacts` 阶段失败的原因和修复方式。
+
+### 🧠 Design Intent (Why)
+这次问题不是证书没有导入,而是 workflow 对 identity 名的解析太脆弱。既然 `.p12` 已经是签名真源,最稳的做法就是让 CI 在导入后自己发现可用 identity,而不是继续依赖手工维护的 CN 字符串。
+
+### 📁 Files Modified
+- `.github/workflows/release.yml`
+- `docs/histories/2026-04/20260420-1828-fix-release-codesign-identity-resolution.md`