Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/semantic_release/hvcs/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ def upload_dists(self, tag: str, dist_glob: str) -> int:

# Upload assets
n_succeeded = 0
errors = []
for file_path in (
f for f in glob.glob(dist_glob, recursive=True) if os.path.isfile(f)
):
Expand All @@ -471,6 +472,12 @@ def upload_dists(self, tag: str, dist_glob: str) -> int:
n_succeeded += 1
except HTTPError: # noqa: PERF203
logger.exception("error uploading asset %s", file_path)
errors.append(
f"failed to upload asset {file_path} to release {release_id}"
)

if errors:
raise AssetUploadError("\n".join(errors))

return n_succeeded

Expand Down
Loading