Skip to content

Commit 598331d

Browse files
committed
notarize app in release
1 parent fd8013f commit 598331d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/build-mac.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,15 @@ jobs:
162162
working-directory: target
163163
# ditto must be used, see https://developer.apple.com/documentation/xcode/packaging-mac-software-for-distribution#Build-a-zip-archive
164164
- name: Zip binary for notarization
165-
if: inputs.notarize
165+
if: (startsWith(github.ref, 'refs/tags/') && github.event.action == 'published') || inputs.notarize
166166
run: ditto -c -k --keepParent ./target/cryptomator-cli.app ./${{ matrix.artifact-name}}
167167
- name: Setup Xcode
168-
if: inputs.notarize
168+
if: (startsWith(github.ref, 'refs/tags/') && github.event.action == 'published') || inputs.notarize
169169
run: sudo xcode-select -s ${{ matrix.xcode-path}}
170170
shell: bash
171171
#would like to uses cocoalibs/xcode-notarization-action@v1, but blocked due to https://github.com/cocoalibs/xcode-notarization-action/issues/1
172172
- name: Prepare Notarization Credentials
173-
if: inputs.notarize
173+
if: (startsWith(github.ref, 'refs/tags/') && github.event.action == 'published') || inputs.notarize
174174
run: |
175175
# create temporary keychain
176176
KEYCHAIN_PATH=$RUNNER_TEMP/notarization.keychain-db
@@ -182,13 +182,13 @@ jobs:
182182
xcrun notarytool store-credentials "notary" --apple-id "${{ secrets.MACOS_NOTARIZATION_APPLE_ID }}" --password "${{ secrets.MACOS_NOTARIZATION_PW }}" --team-id "${{ secrets.MACOS_NOTARIZATION_TEAM_ID }}" --keychain "${KEYCHAIN_PATH}"
183183
shell: bash
184184
- name: Notarize
185-
if: inputs.notarize
185+
if: (startsWith(github.ref, 'refs/tags/') && github.event.action == 'published') || inputs.notarize
186186
run: |
187187
KEYCHAIN_PATH=$RUNNER_TEMP/notarization.keychain-db
188188
xcrun notarytool submit ${{ matrix.artifact-name }} --keychain-profile "notary" --keychain "${KEYCHAIN_PATH}" --wait
189189
shell: bash
190190
- name: Staple
191-
if: inputs.notarize
191+
if: (startsWith(github.ref, 'refs/tags/') && github.event.action == 'published') || inputs.notarize
192192
run: xcrun stapler staple ./target/cryptomator-cli.app
193193
shell: bash
194194
- name: Cleanup

0 commit comments

Comments
 (0)