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
15 changes: 14 additions & 1 deletion .github/workflows/companion-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,20 @@ jobs:
--key-id "$APPLE_NOTARY_KEY_ID" \
--issuer "$APPLE_NOTARY_ISSUER_ID" \
--wait
xcrun stapler staple "$APP_BUNDLE_PATH"
# stapler fetches the ticket from Apple's CDN, which sometimes drops
# the connection (exit 68) right after notarization is accepted.
max_attempts=5
for attempt in $(seq 1 "$max_attempts"); do
if xcrun stapler staple "$APP_BUNDLE_PATH"; then
break
fi
if [ "$attempt" -eq "$max_attempts" ]; then
echo "stapler failed after $max_attempts attempts" >&2
exit 1
fi
echo "stapler attempt $attempt failed; retrying in 30s"
sleep 30
done
ditto -c -k --keepParent "$APP_BUNDLE_PATH" "$ZIP_NAME"
echo "APPLE_RELEASE_NOTARIZED=1" >> "$GITHUB_ENV"

Expand Down
Loading