Skip to content

Commit

Permalink
[macOS] Sign all main commits.
Browse files Browse the repository at this point in the history
  • Loading branch information
rsmmr committed Dec 11, 2023
1 parent 5998b91 commit d514f27
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ jobs:
steps:
- name: Prepare
run: |
brew update
brew unlink python
brew link --overwrite python
brew upgrade --force python
brew upgrade --force php
brew upgrade
brew install ninja ccache
pip3 install btest zkg
brew update || true
brew unlink python || true
brew link --overwrite python || true
brew upgrade --force python || true
brew upgrade --force php || true
brew upgrade || true
brew install ninja ccache || true
pip3 install btest zkg || true
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -173,15 +173,15 @@ jobs:
### Only on topic branches

- name: Package (without codesign)
if: github.ref_name != 'main' && (!startsWith(github.ref, 'refs/tags/v') || contains(github.ref, '-dev'))
if: github.ref_name != 'main' && !startsWith(github.ref, 'refs/tags/v')
run: |
ninja -C build package
(cd build/dist && echo "ZA_DIST=$(echo *.dmg)" >>$GITHUB_ENV)
### Only on the main branch

- name: Set up keychain for code signing
if: github.ref == 'refs/heads/main' || (startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-dev'))
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
env:
MACOS_CERTIFICATE_APPLICATION_PEM: ${{ secrets.MACOS_CERTIFICATE_APPLICATION_PEM }}
MACOS_CERTIFICATE_APPLICATION_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_APPLICATION_PASSWORD }}
Expand All @@ -196,7 +196,7 @@ jobs:
security set-key-partition-list -S apple-tool:,apple: -s -k "${MACOS_KEYCHAIN_PASSWORD}" ${RUNNER_TEMP}/keychain-db
- name: Package (with codesign)
if: github.ref == 'refs/heads/main' || (startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-dev'))
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
env:
MACOS_CERTIFICATE_APPLICATION_ID: ${{ secrets.MACOS_CERTIFICATE_APPLICATION_ID }}
MACOS_NOTARIZATION_USER: ${{ secrets.MACOS_NOTARIZATION_USER }}
Expand All @@ -207,7 +207,7 @@ jobs:
(cd build/dist && echo "ZA_DIST=$(echo *.dmg)" >>$GITHUB_ENV)
- name: Clean up keychain
if: always() && (github.ref == 'refs/heads/main' || (startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-dev')))
if: always() && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
run: |
security delete-keychain ${RUNNER_TEMP}/keychain-db
Expand Down

0 comments on commit d514f27

Please sign in to comment.