Skip to content

Commit

Permalink
Fix release helper not considering workflow status (#6320)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackenmen committed Mar 23, 2024
1 parent afabc47 commit 76c2c75
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tools/release_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit 76c2c75

Please sign in to comment.