script/release: push branch and tag together so master doesn't lag the tag

Previously the script pushed only the tag, leaving origin/master behind the release by the version-bump commit (the tag pointed at an unpushed commit). Push the current branch and the tag atomically with --atomic.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019fHdm92yjvguPi2LiXfLB9
This commit is contained in:
Timmy
2026-07-18 12:18:40 +01:00
co-authored by Claude Opus 4.8
parent a43148ee13
commit bcac92669a
+7 -1
View File
@@ -281,7 +281,13 @@ echo "$RELEASE_BODY"
# ── Tag & Push ─────────────────────────────────────────────────
echo "==> Tagging ${TAG}..."
git tag -a "$TAG" -m "Release ${TAG}"
git push origin "$TAG"
# Push the branch (with the version-bump commit) and the tag together, so
# the remote branch never lags the release tag. --atomic means both refs
# land or neither does, avoiding a pushed tag pointing at an unpushed commit.
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
echo "==> Pushing ${BRANCH} and ${TAG}..."
git push --atomic origin "$BRANCH" "$TAG"
# ── Create Gitea Release ──────────────────────────────────────
echo "==> Creating release on Gitea..."