@@ -161,15 +161,15 @@ jobs:
161161 working-directory : target
162162 # ditto must be used, see https://developer.apple.com/documentation/xcode/packaging-mac-software-for-distribution#Build-a-zip-archive
163163 - name : Zip binary for notarization
164- if : inputs.notarize
164+ if : (startsWith(github.ref, 'refs/tags/') && github.event.action == 'published') || inputs.notarize
165165 run : ditto -c -k --keepParent ./target/cryptomator-cli.app ./${{ matrix.artifact-name}}
166166 - name : Setup Xcode
167- if : inputs.notarize
167+ if : (startsWith(github.ref, 'refs/tags/') && github.event.action == 'published') || inputs.notarize
168168 run : sudo xcode-select -s ${{ matrix.xcode-path}}
169169 shell : bash
170170 # would like to uses cocoalibs/xcode-notarization-action@v1, but blocked due to https://github.com/cocoalibs/xcode-notarization-action/issues/1
171171 - name : Prepare Notarization Credentials
172- if : inputs.notarize
172+ if : (startsWith(github.ref, 'refs/tags/') && github.event.action == 'published') || inputs.notarize
173173 run : |
174174 # create temporary keychain
175175 KEYCHAIN_PATH=$RUNNER_TEMP/notarization.keychain-db
@@ -181,13 +181,13 @@ jobs:
181181 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}"
182182 shell : bash
183183 - name : Notarize
184- if : inputs.notarize
184+ if : (startsWith(github.ref, 'refs/tags/') && github.event.action == 'published') || inputs.notarize
185185 run : |
186186 KEYCHAIN_PATH=$RUNNER_TEMP/notarization.keychain-db
187187 xcrun notarytool submit ${{ matrix.artifact-name }} --keychain-profile "notary" --keychain "${KEYCHAIN_PATH}" --wait
188188 shell : bash
189189 - name : Staple
190- if : inputs.notarize
190+ if : (startsWith(github.ref, 'refs/tags/') && github.event.action == 'published') || inputs.notarize
191191 run : xcrun stapler staple ./target/cryptomator-cli.app
192192 shell : bash
193193 - name : Cleanup
0 commit comments