Skip to content

Commit

Permalink
CI: Move to unified macOS binary build step in GitHub Actions
Browse files Browse the repository at this point in the history
Unset the signing-related env vars if not decrypted, so signing will not occur.
  • Loading branch information
DeeDeeG committed Sep 26, 2023
1 parent d589c05 commit 8f94a82
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ jobs:
yarn run build:apm
# macOS Signing Stuff
- name: Build Pulsar Binaries (macOS) (Signed)
if: ${{ runner.os == 'macOS' && github.event.pull_request.head.repo.full_name == 'pulsar-edit/pulsar' }}
- name: Build Pulsar Binaries (macOS)
if: ${{ runner.os == 'macOS' }}
# PRs generated from forks cannot access GitHub Secrets
# So if the PR is a fork, we will still build, but will not sign.
env:
Expand All @@ -101,16 +101,13 @@ jobs:
timeout_minutes: 30
max_attempts: 3
retry_on: error
command: yarn dist

- name: Build Pulsar Binaries (macOS) (Unsigned)
if: ${{ runner.os == 'macOS' && github.event.pull_request.head.repo.full_name != 'pulsar-edit/pulsar' }}
uses: nick-fields/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd
with:
timeout_minutes: 30
max_attempts: 3
retry_on: error
command: yarn dist
command: |
for var in CSC_LINK CSC_KEY_PASSWORD APPLEID APPLEID_PASSWORD TEAM_ID; do
# Fully unset these env vars if have been set as empty (such as when not decrypted for PRs),
# since otherwise they will make electron-builder try to sign and fail if they are set empty.
if [[ -z ${!var} ]]; then unset ${var}; fi
done
yarn dist
- name: Build Pulsar Binaries
if: ${{ runner.os != 'macOS' }}
Expand Down

0 comments on commit 8f94a82

Please sign in to comment.