From 175b33b2434339432ffa07be6726e796ab7997f3 Mon Sep 17 00:00:00 2001 From: Pedro Brochado Date: Wed, 8 Apr 2026 10:19:14 -0300 Subject: [PATCH] Make release git push atomic We want it to either succeed or fail without leftovers. --- templates/github/.github/workflows/scripts/release.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/templates/github/.github/workflows/scripts/release.sh b/templates/github/.github/workflows/scripts/release.sh index c980dd9b..40bbcb19 100755 --- a/templates/github/.github/workflows/scripts/release.sh +++ b/templates/github/.github/workflows/scripts/release.sh @@ -24,6 +24,5 @@ towncrier build --yes --version "${NEW_VERSION}" bump-my-version bump release --commit --message "Release {new_version}" --tag --tag-name "{new_version}" --tag-message "Release {new_version}" --allow-dirty bump-my-version bump patch --commit -# Git push is not atomic. And we want this to fail if the branch could not be updated. -git push origin "${BRANCH}" -git push origin "${NEW_VERSION}" +# Git push is not atomic by default! +git push --atomic origin "${BRANCH}" "${NEW_VERSION}"