Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: use per-runner keychain passwords for macOS codesign

Louis Beaumontcdff512411d9
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml
index b42b6b594..de92d68cc 100644
--- a/.github/workflows/release-app.yml
+++ b/.github/workflows/release-app.yml
@@ -744,7 +744,8 @@ jobs:
env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
- KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
+ KEYCHAIN_PASSWORD_MACBOOK: ${{ secrets.KEYCHAIN_PASSWORD_MACBOOK }}
+ KEYCHAIN_PASSWORD_MACMINI: ${{ secrets.KEYCHAIN_PASSWORD_MACMINI }}
run: |
# Import the signing cert directly into the login keychain instead of letting
# Tauri create a temp keychain. On self-hosted runners, Tauri's temp keychain
@@ -757,9 +758,10 @@ jobs:
# creation entirely.
# Unlock login keychain first (required on self-hosted runners where
- # the keychain is locked and UI interaction is not available)
- KC_PASS="${KEYCHAIN_PASSWORD:-}"
- security unlock-keychain -p "$KC_PASS" ~/Library/Keychains/login.keychain-db 2>/dev/null || \
+ # the keychain is locked and UI interaction is not available).
+ # Try MacBook password, then Mac Mini password, then empty.
+ security unlock-keychain -p "$KEYCHAIN_PASSWORD_MACBOOK" ~/Library/Keychains/login.keychain-db 2>/dev/null || \
+ security unlock-keychain -p "$KEYCHAIN_PASSWORD_MACMINI" ~/Library/Keychains/login.keychain-db 2>/dev/null || \
security unlock-keychain -p "" ~/Library/Keychains/login.keychain-db 2>/dev/null || true
# Decode and import the p12
@@ -777,7 +779,11 @@ jobs:
# Set partition list to allow codesign access without UI prompt
security set-key-partition-list \
-S apple-tool:,apple:,codesign: \
- -s -k "$KC_PASS" \
+ -s -k "$KEYCHAIN_PASSWORD_MACBOOK" \
+ ~/Library/Keychains/login.keychain-db 2>/dev/null || \
+ security set-key-partition-list \
+ -S apple-tool:,apple:,codesign: \
+ -s -k "$KEYCHAIN_PASSWORD_MACMINI" \
~/Library/Keychains/login.keychain-db 2>/dev/null || true
rm -f "$CERT_PATH"