Skip to content

Commit

Permalink
Fix status message posting when uploading to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Jul 16, 2023
1 parent af01400 commit 26816b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,9 @@ jobs:
# This is a deliberate comparison to the empty string.
if statuses["publish"] == "" and "${{ github.event.inputs.upload }}" == "false":
publish = statuses.pop("publish")
else:
publish = ""
if all(v == "success" for v in statuses.values()):
overall_status = "success"
elif any(v in ("cancelled", "") for v in statuses.values()):
Expand All @@ -405,7 +408,7 @@ jobs:
overall_status = "failure"
status_counts = Counter(statuses.values())
status_counts.update(publish)
status_counts.update([publish])
description = []
if overall_status in ("error", "failure"):
if status_counts.get("success") is not None:
Expand Down

0 comments on commit 26816b5

Please sign in to comment.