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
18 changes: 17 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,23 @@ jobs:
--title "chore(release): v${version}" \
--body "Automated release PR generated by \`.github/workflows/release.yml\`. Bumps every version-bearing manifest to v${version}.")
echo "Created release PR: $pr_url"
gh pr merge "$pr_url" --squash --delete-branch

# `gh pr create` returns synchronously but GraphQL's PR node
# is eventually consistent — the v1.0.4 release hit a race
# where `gh pr merge` fired ~500ms after create and got:
# "Could not resolve to a PullRequest with the number of N"
# Retry up to 5 times with a 2s backoff to cover propagation.
for attempt in 1 2 3 4 5; do
if gh pr merge "$pr_url" --squash --delete-branch; then
break
fi
if [ "$attempt" = "5" ]; then
echo "::error::gh pr merge still failing after 5 attempts"
exit 1
fi
echo "gh pr merge attempt $attempt failed (likely GraphQL lag); retrying in 2s..."
sleep 2
done

- name: Tag the merged commit on main
run: |
Expand Down