From fd8bcad5a102eb119bf1c855e6243e25a9202beb Mon Sep 17 00:00:00 2001 From: jcm <6864788+jcm93@users.noreply.github.com> Date: Sun, 19 Jan 2025 02:09:06 -0800 Subject: [PATCH] CI: fix macOS CI PR runs (#1777) Fix macOS CI on pull requests by persisting if we fail to import the certificate (as expected). Notarization should expectedly fail as well on pull requests, if it tries to run. (Whether CI succeeds on this is the testing) --- .github/workflows/build_new.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_new.yml b/.github/workflows/build_new.yml index 4faacb611..51f99938a 100644 --- a/.github/workflows/build_new.yml +++ b/.github/workflows/build_new.yml @@ -80,7 +80,7 @@ jobs: - name: "macOS: Import Certificate" if: runner.os == 'macOS' uses: apple-actions/import-codesign-certs@v3 - continue-on-error: ${{ github.repository != 'ares-emulator/ares' }} + continue-on-error: ${{ github.repository != 'ares-emulator/ares' || needs.pr-check.outputs.number != 'null' }} with: p12-file-base64: ${{ secrets.MACOS_CERTIFICATE_DATA }} p12-password: ${{ secrets.MACOS_CERTIFICATE_PASSPHRASE }} @@ -131,7 +131,7 @@ jobs: timestampUrl: 'http://timestamp.digicert.com' - name: "macOS: notarize" if: runner.os == 'macOS' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) - continue-on-error: ${{ github.repository != 'ares-emulator/ares' }} + continue-on-error: ${{ github.repository != 'ares-emulator/ares' || needs.pr-check.outputs.number != 'null' }} run: | ditto -c -k --keepParent ${{ github.workspace }}/build/desktop-ui/RelWithDebInfo/ares.app /tmp/ares.zip xcrun notarytool submit /tmp/ares.zip --apple-id "$MACOS_NOTARIZATION_USERNAME" --password "$MACOS_NOTARIZATION_PASSWORD" --team-id "$MACOS_NOTARIZATION_TEAMID" --wait