Skip to content

Commit

Permalink
Fix code signing script for MacOS builds
Browse files Browse the repository at this point in the history
It is unclear whether the keychain preparation script failed due to
changes by Homebrew or due to the recent update to use MacOS 13 for
release builds. Regardless, older versions of either Homebrew or MacOS
are no longer relevant and all that matters is that the keychain
preparation script works again.
  • Loading branch information
leonlynch committed Oct 18, 2024
1 parent 0aa8afc commit 8390cab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/prepare_macos_keychain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# - https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development
# - https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions
# - https://federicoterzi.com/blog/automatic-code-signing-and-notarization-for-macos-apps-using-github-actions/
# - https://github.com/lando/code-sign-action/

# This script assumes that these environment variables are provided:
# - RUNNER_TEMP (temporary directory provided by Github Actions runner)
Expand All @@ -21,9 +22,9 @@ security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH

# Decode and import signing certificate
echo -n "$OPENEMV_MACOS_CERT_BASE64" | base64 --decode --output $OPENEMV_MACOS_CERT_PATH
echo -n "$OPENEMV_MACOS_CERT_BASE64" | base64 --decode > $OPENEMV_MACOS_CERT_PATH
security import $OPENEMV_MACOS_CERT_PATH -P "$OPENEMV_MACOS_CERT_PWD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
security list-keychains -d user -s $KEYCHAIN_PATH
security find-identity -v -p codesigning

# Allow codesign application to use signing key
Expand Down

0 comments on commit 8390cab

Please sign in to comment.