Skip to content

Commit

Permalink
CI: fix macOS CI PR runs (#1777)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
jcm93 authored Jan 19, 2025
1 parent da7a79b commit fd8bcad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fd8bcad

Please sign in to comment.