Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,26 @@ jobs:

echo "$NOTARY_KEY_P8" | base64 --decode > "$RUNNER_TEMP/notary.p8"
ditto -c -k "${{ matrix.asset_name }}" "$RUNNER_TEMP/notarize.zip"
xcrun notarytool submit "$RUNNER_TEMP/notarize.zip" \
--key "$RUNNER_TEMP/notary.p8" \
--key-id "$NOTARY_KEY_ID" \
--issuer "$NOTARY_ISSUER_ID" \
--wait
# Apple's notary service can be slow and its status endpoint
# occasionally drops the polling connection (-1009), which kills
# --wait. Retry the whole submit-and-wait so a transient blip doesn't
# fail the release; --timeout bounds each attempt.
notarized=false
for attempt in 1 2 3; do
if xcrun notarytool submit "$RUNNER_TEMP/notarize.zip" \
--key "$RUNNER_TEMP/notary.p8" \
--key-id "$NOTARY_KEY_ID" \
--issuer "$NOTARY_ISSUER_ID" \
--wait --timeout 30m; then
notarized=true
break
fi
echo "notarize attempt $attempt failed; retrying in 30s"
sleep 30
done
rm -f "$RUNNER_TEMP/notary.p8" "$RUNNER_TEMP/notarize.zip"
security delete-keychain "$KEYCHAIN" 2>/dev/null || true
[ "$notarized" = true ] || { echo "notarization failed after retries"; exit 1; }

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down
Loading