From 5727592abe701be13014cde350fb77e2ee3569c1 Mon Sep 17 00:00:00 2001 From: PJ Date: Mon, 22 Jun 2026 11:48:49 -0400 Subject: [PATCH] ci(release): rebase onto origin/main before pushing version bump --- .github/workflows/release.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a582789..d57e4c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,8 +53,20 @@ jobs: git config user.email "github-actions[bot]@users.noreply.github.com" git add src-tauri/tauri.conf.json package.json src-tauri/Cargo.toml git commit -m "chore(release): $TAG" + for attempt in 1 2 3 4 5; do + git fetch origin main + git rebase origin/main + if git push origin HEAD; then + break + fi + if [ "$attempt" = "5" ]; then + echo "::error::main kept advancing; could not push release bump after 5 attempts." + exit 1 + fi + echo "main advanced during release; rebasing and retrying ($attempt)…" + sleep 3 + done git tag "$TAG" - git push origin HEAD git push origin "$TAG" - name: Create draft release