Skip to content

Commit

Permalink
Avoid codesign and notarization in PR and forks
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius committed Sep 4, 2024
1 parent 519e34b commit 965b0d2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/gearboy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
path: artifact/*
linux-clang:
name: Linux (Clang/LLVM)
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
contents: read
steps:
Expand Down Expand Up @@ -124,6 +124,7 @@ jobs:
run: make dist
working-directory: platforms/macos
- name: Codesign app bundle
if: needs.pr-check.outputs.number == null && github.repository_owner == 'drhelius'
env:
MACOS_CERTIFICATE: ${{ secrets.PROD_MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.PROD_MACOS_CERTIFICATE_PWD }}
Expand All @@ -145,6 +146,7 @@ jobs:
codesign -v -vvv --deep "${{ env.NAME_UPPER }}.app"
working-directory: platforms/macos
- name: Notarize app bundle
if: needs.pr-check.outputs.number == null && github.repository_owner == 'drhelius'
env:
PROD_MACOS_NOTARIZATION_APPLE_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
PROD_MACOS_NOTARIZATION_TEAM_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
Expand All @@ -155,12 +157,12 @@ jobs:
xcrun notarytool submit "notarization.zip" --keychain-profile "notarytool-profile" --wait
xcrun stapler staple "${{ env.NAME_UPPER }}.app"
spctl -a -vvv -t install "${{ env.NAME_UPPER }}.app"
ditto -c -k --keepParent "${{ env.NAME_UPPER }}.app" "${{ env.NAME_UPPER }}.app.zip"
working-directory: platforms/macos
- name: Prepare artifact directory
run: |
mkdir -p artifact
cp platforms/README.txt artifact/
ditto -c -k --keepParent "${{ env.NAME_UPPER }}.app" "${{ env.NAME_UPPER }}.app.zip"
mv platforms/macos/${{ env.NAME_UPPER }}.app.zip artifact/
- name: Archive binary
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 965b0d2

Please sign in to comment.