Skip to content

Commit

Permalink
Setup certificate for codesigning in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismaltby committed Mar 15, 2024
1 parent dadc272 commit a4e25f5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ jobs:
with:
node-version: '21.6.2'

- name: Setup codesign certificate
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
run: |
echo $MACOS_CERTIFICATE | base64 —decode > certificate.p12
security create-keychain -p $KEYCHAIN_PWD build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p $KEYCHAIN_PWD build.keychain
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $KEYCHAIN_PWD build.keychain
security find-identity -v -p codesigning
- uses: actions/cache@v4
with:
path: |
Expand Down

0 comments on commit a4e25f5

Please sign in to comment.