@@ -162,15 +162,15 @@ jobs:
162
162
working-directory : target
163
163
# ditto must be used, see https://developer.apple.com/documentation/xcode/packaging-mac-software-for-distribution#Build-a-zip-archive
164
164
- name : Zip binary for notarization
165
- if : inputs.notarize
165
+ if : (startsWith(github.ref, 'refs/tags/') && github.event.action == 'published') || inputs.notarize
166
166
run : ditto -c -k --keepParent ./target/cryptomator-cli.app ./${{ matrix.artifact-name}}
167
167
- name : Setup Xcode
168
- if : inputs.notarize
168
+ if : (startsWith(github.ref, 'refs/tags/') && github.event.action == 'published') || inputs.notarize
169
169
run : sudo xcode-select -s ${{ matrix.xcode-path}}
170
170
shell : bash
171
171
# would like to uses cocoalibs/xcode-notarization-action@v1, but blocked due to https://github.com/cocoalibs/xcode-notarization-action/issues/1
172
172
- name : Prepare Notarization Credentials
173
- if : inputs.notarize
173
+ if : (startsWith(github.ref, 'refs/tags/') && github.event.action == 'published') || inputs.notarize
174
174
run : |
175
175
# create temporary keychain
176
176
KEYCHAIN_PATH=$RUNNER_TEMP/notarization.keychain-db
@@ -182,13 +182,13 @@ jobs:
182
182
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}"
183
183
shell : bash
184
184
- name : Notarize
185
- if : inputs.notarize
185
+ if : (startsWith(github.ref, 'refs/tags/') && github.event.action == 'published') || inputs.notarize
186
186
run : |
187
187
KEYCHAIN_PATH=$RUNNER_TEMP/notarization.keychain-db
188
188
xcrun notarytool submit ${{ matrix.artifact-name }} --keychain-profile "notary" --keychain "${KEYCHAIN_PATH}" --wait
189
189
shell : bash
190
190
- name : Staple
191
- if : inputs.notarize
191
+ if : (startsWith(github.ref, 'refs/tags/') && github.event.action == 'published') || inputs.notarize
192
192
run : xcrun stapler staple ./target/cryptomator-cli.app
193
193
shell : bash
194
194
- name : Cleanup
0 commit comments