Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
github actions macos codesign
- name: Setup codesign
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
KEYCHAIN_NAME: hello
KEYCHAIN_PWD: hello
run: |
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
security create-keychain -p $KEYCHAIN_PWD $KEYCHAIN_NAME
security default-keychain -s $KEYCHAIN_NAME
security unlock-keychain -p $KEYCHAIN_PWD $KEYCHAIN_NAME
security import certificate.p12 -k $KEYCHAIN_NAME -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $KEYCHAIN_PWD $KEYCHAIN_NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment