Created
April 3, 2021 15:35
-
-
Save abemedia/d9be4af700cdbb7f91e502c549db160d to your computer and use it in GitHub Desktop.
github actions macos codesign
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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