Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ jobs:
permissions:
contents: read
env:
HAS_SIGNING_SECRETS: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12 != '' }}
# macOS signing/notarization is expensive (notary upload + polling) and is
# not needed for PR validation — developers can clear the quarantine
# attribute on unsigned PR artifacts if they need to run them. Gate it to
# main CI runs (pushes to main and v* tags), i.e. skip on pull_request.
MACOS_SIGNING_ENABLED: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12 != '' && github.event_name != 'pull_request' }}

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -97,7 +101,7 @@ jobs:
find "$APP" -name '*.pdb' -delete

- name: Import signing certificate
if: matrix.rid == 'osx-arm64' && env.HAS_SIGNING_SECRETS == 'true'
if: matrix.rid == 'osx-arm64' && env.MACOS_SIGNING_ENABLED == 'true'
env:
P12_BASE64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12 }}
P12_PASSWORD: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
Expand All @@ -110,7 +114,7 @@ jobs:
security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain

- name: Sign macOS .app bundle
if: matrix.rid == 'osx-arm64' && env.HAS_SIGNING_SECRETS == 'true'
if: matrix.rid == 'osx-arm64' && env.MACOS_SIGNING_ENABLED == 'true'
env:
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
run: |
Expand All @@ -137,7 +141,7 @@ jobs:
"$APP"

- name: Notarize macOS .app bundle
if: matrix.rid == 'osx-arm64' && env.HAS_SIGNING_SECRETS == 'true'
if: matrix.rid == 'osx-arm64' && env.MACOS_SIGNING_ENABLED == 'true'
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
Expand All @@ -164,7 +168,7 @@ jobs:
fi

- name: Staple notarization ticket
if: matrix.rid == 'osx-arm64' && env.HAS_SIGNING_SECRETS == 'true'
if: matrix.rid == 'osx-arm64' && env.MACOS_SIGNING_ENABLED == 'true'
continue-on-error: true
run: |
# The notarization ticket may not be immediately available in
Expand Down
Loading