diff --git a/script/release b/script/release index 73aa1f3a..ae37dc86 100755 --- a/script/release +++ b/script/release @@ -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..."