macOS signing: keep the temporary keychain until the build has signed with it

import-cert.sh deleted its whole private temp directory on exit, and the keychain lives there, so codesign failed with "The specified item could not be found in the keychain" in the release build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-25 09:14:05 -04:00
co-authored by Claude Opus 5.5
parent 32b836fbc5
commit 4b76c407d5
+3 -1
View File
@@ -19,7 +19,9 @@ fi
TMP_BASE="${RUNNER_TEMP:-${TMPDIR:-/tmp}}"
TMP="$(mktemp -d "${TMP_BASE}/figcraft-signing.XXXXXX")"
trap 'rm -rf "$TMP"' EXIT
# Remove only the decoded certificate: the keychain lives in the same directory and codesign
# needs it until the workflow's "Remove temporary keychain" step deletes it.
trap 'rm -f "${CERT:-}"' EXIT
KEYCHAIN="$TMP/figcraft-signing.keychain-db"
CERT="$TMP/figcraft-signing.p12"
KC_PASS="${KEYCHAIN_PASSWORD:-$(openssl rand -hex 24)}"