mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
feat(release): enhance macOS signing process in release workflow
- Added steps to ensure the signing identity is available by creating and managing a keychain for certificate import. - Implemented security commands to unlock the keychain and import the signing certificate, improving the reliability of the signing process. - Cleaned up temporary certificate files after use to maintain a secure environment.
This commit is contained in:
@@ -510,6 +510,21 @@ jobs:
|
||||
APP_PATH="${{ steps.locate-app.outputs.app_path }}"
|
||||
ENTITLEMENTS="app/src-tauri/entitlements.sidecar.plist"
|
||||
|
||||
# Ensure signing identity is available — re-import cert into a keychain
|
||||
# in case tauri-action's keychain was cleaned up
|
||||
KEYCHAIN="resign-$$.keychain-db"
|
||||
KEYCHAIN_PW="$(openssl rand -base64 24)"
|
||||
CERT_FILE="$(mktemp /tmp/cert-XXXXXX.p12)"
|
||||
echo "$APPLE_CERTIFICATE_BASE64" | base64 --decode > "$CERT_FILE"
|
||||
security create-keychain -p "$KEYCHAIN_PW" "$KEYCHAIN"
|
||||
security set-keychain-settings -lut 21600 "$KEYCHAIN"
|
||||
security unlock-keychain -p "$KEYCHAIN_PW" "$KEYCHAIN"
|
||||
security import "$CERT_FILE" -k "$KEYCHAIN" -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign -T /usr/bin/security
|
||||
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PW" "$KEYCHAIN"
|
||||
security list-keychains -d user -s "$KEYCHAIN" $(security list-keychains -d user | tr -d '"')
|
||||
rm -f "$CERT_FILE"
|
||||
echo "Signing identity imported into $KEYCHAIN"
|
||||
|
||||
echo "=== Re-signing binaries inside $APP_PATH with hardened runtime ==="
|
||||
|
||||
# Determine main executable name from Info.plist
|
||||
|
||||
Reference in New Issue
Block a user