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: |