From a4e25f5879fc4bcf8e0a57c950e19a359e4f978e Mon Sep 17 00:00:00 2001 From: Chris Maltby Date: Fri, 15 Mar 2024 14:07:38 +0000 Subject: [PATCH] Setup certificate for codesigning in github actions --- .github/workflows/main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 56660d927..0c552aac4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: |