From acedbcf6ba10598b5b97b08da1bddc034dca7a16 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Sat, 1 Jun 2024 18:29:54 +0200 Subject: [PATCH] fix(macos): notarize --- .github/workflows/insider-macos.yml | 2 +- .github/workflows/stable-macos.yml | 2 +- prepare_assets.sh | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/insider-macos.yml b/.github/workflows/insider-macos.yml index da2c8dc09de..bf4676ca60d 100644 --- a/.github/workflows/insider-macos.yml +++ b/.github/workflows/insider-macos.yml @@ -86,7 +86,7 @@ jobs: env: CERTIFICATE_OSX_APP_PASSWORD: ${{ secrets.CERTIFICATE_OSX_NEW_APP_PASSWORD }} CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_NEW_ID }} - CERTIFICATE_OSX_P12_FILE: ${{ secrets.CERTIFICATE_OSX_NEW_P12_FILE }} + CERTIFICATE_OSX_P12_DATA: ${{ secrets.CERTIFICATE_OSX_NEW_P12_DATA }} CERTIFICATE_OSX_P12_PASSWORD: ${{ secrets.CERTIFICATE_OSX_NEW_P12_PASSWORD }} run: ./prepare_assets.sh if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') diff --git a/.github/workflows/stable-macos.yml b/.github/workflows/stable-macos.yml index 899fc3bf45e..b201fe0c270 100644 --- a/.github/workflows/stable-macos.yml +++ b/.github/workflows/stable-macos.yml @@ -85,7 +85,7 @@ jobs: env: CERTIFICATE_OSX_APP_PASSWORD: ${{ secrets.CERTIFICATE_OSX_NEW_APP_PASSWORD }} CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_NEW_ID }} - CERTIFICATE_OSX_P12_FILE: ${{ secrets.CERTIFICATE_OSX_NEW_P12_FILE }} + CERTIFICATE_OSX_P12_DATA: ${{ secrets.CERTIFICATE_OSX_NEW_P12_DATA }} CERTIFICATE_OSX_P12_PASSWORD: ${{ secrets.CERTIFICATE_OSX_NEW_P12_PASSWORD }} run: ./prepare_assets.sh if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') diff --git a/prepare_assets.sh b/prepare_assets.sh index dc7dcc751c4..ddeba4c44e0 100755 --- a/prepare_assets.sh +++ b/prepare_assets.sh @@ -25,7 +25,7 @@ if [[ "${OS_NAME}" == "osx" ]]; then echo "AGENT_TEMPDIRECTORY: ${AGENT_TEMPDIRECTORY}" echo "RUNNER_TEMP: ${RUNNER_TEMP}" - echo "${CERTIFICATE_OSX_P12_FILE}" | base64 --decode > "${CERTIFICATE_P12}" + echo "${CERTIFICATE_OSX_P12_DATA}" | base64 --decode > "${CERTIFICATE_P12}" echo "+ create temporary keychain" security create-keychain -p pwd "${KEYCHAIN}" @@ -37,7 +37,6 @@ if [[ "${OS_NAME}" == "osx" ]]; then security import "${CERTIFICATE_P12}" -k "${KEYCHAIN}" -P "${CERTIFICATE_OSX_P12_PASSWORD}" -T /usr/bin/codesign CODESIGN_IDENTITY="$( security find-identity -v -p codesigning "${KEYCHAIN}" | grep -oEi "([0-9A-F]{40})" | head -n 1 )" - echo "CODESIGN_IDENTITY: ${CODESIGN_IDENTITY}" export CODESIGN_IDENTITY security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k pwd "${KEYCHAIN}" > /dev/null