Fix release helper not considering workflow status (#6320)

This commit is contained in:
Jakub Kuczys 2024-03-24 00:14:31 +01:00 committed by GitHub
parent afabc4769d
commit 76c2c75f2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -753,7 +753,15 @@ def run_prepare_release_workflow(release_type: ReleaseType, version: str) -> Non
break
time.sleep(5)
subprocess.check_call(("gh", "run", "watch", str(run_id)))
try:
subprocess.check_call(("gh", "run", "watch", "--exit-status", str(run_id)))
except subprocess.CalledProcessError:
set_release_stage(ReleaseStage.CHANGELOG_REVIEWED)
raise click.ClickException(
"Github Actions workflow failed, run this command again"
" once you're ready to try running the 'Prepare Release' workflow again."
)
rich.print("The automated pull requests have been created.\n")
set_release_stage(ReleaseStage.PREPARE_RELEASE_RAN)
rich.print(Markdown("# Step 6: Merge the automatically created PRs"))