mirror of
https://github.com/priyanshujain/margin.git
synced 2026-10-02 19:17:03 +00:00
ci(release): rebase onto origin/main before pushing version bump
This commit is contained in:
1 parent
706db33792
commit
5727592abe
1 file changed
+13
-1
@@ -53,8 +53,20 @@ jobs:
|
|||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
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 add src-tauri/tauri.conf.json package.json src-tauri/Cargo.toml
|
||||||
git commit -m "chore(release): $TAG"
|
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 tag "$TAG"
|
||||||
git push origin HEAD
|
|
||||||
git push origin "$TAG"
|
git push origin "$TAG"
|
||||||
|
|
||||||
- name: Create draft release
|
- name: Create draft release
|
||||||
|
|||||||
Reference in new issue
Block a user