From eb810b6f3894e1ea1283dfba25bf14585a3f7358 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Tue, 24 Oct 2023 14:30:09 +0100 Subject: [PATCH] Bail out of the release if twine fails --- scripts-dev/release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts-dev/release.py b/scripts-dev/release.py index bee8761182..02a599667c 100755 --- a/scripts-dev/release.py +++ b/scripts-dev/release.py @@ -485,7 +485,7 @@ def _upload(gh_token: Optional[str]) -> None: urllib.request.urlretrieve(asset_download_url, filename=filename) if click.confirm("Upload to PyPI?", default=True): - subprocess.run("twine upload *", shell=True, cwd=tmpdir) + subprocess.run("twine upload *", shell=True, cwd=tmpdir, check=True) click.echo( f"Done! Remember to merge the tag {tag_name} into the appropriate branches"