-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't workingconfirmedPrevent from becoming stalePrevent from becoming stale
Description
Bug Report
Description
Trying to publish asset with wrong permissions.
Expected behavior
Step fails
Actual behavior
403 error in log, but step marked as successful
Environment
- Action version: v10.3.1
Configuration
GitHub Actions Job Definition
- name: Upload to GitHub Release Assets
uses: python-semantic-release/publish-action@v10.3.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ needs.release.outputs.tag }}
verbosity: 2Semantic Release Configuration
Execution Log
semantic-release -vv publish
2025-08-31T12:13:48.0967672Z ERROR error uploading asset paws_bakery-0.4.1.zip github.py:473
2025-08-31T12:13:48.0968645Z ╭──── Traceback (most recent call last) ─────╮
2025-08-31T12:13:48.0969347Z │ /opt/psr/.venv/lib/python3.13/site-package │
2025-08-31T12:13:48.0970035Z │ s/semantic_release/hvcs/github.py:470 in │
2025-08-31T12:13:48.0970651Z │ upload_dists │
2025-08-31T12:13:48.0971251Z │ │
2025-08-31T12:13:48.0971794Z │ 467 │ │ │ f for f in glob.glob(dis │
2025-08-31T12:13:48.0972368Z │ 468 │ │ ): │
2025-08-31T12:13:48.0972901Z │ 469 │ │ │ try: │
2025-08-31T12:13:48.0973469Z │ ❱ 470 │ │ │ │ self.upload_release_ │
2025-08-31T12:13:48.0974053Z │ 471 │ │ │ │ n_succeeded += 1 │
2025-08-31T12:13:48.0975165Z │ 472 │ │ │ except HTTPError: # noq │
2025-08-31T12:13:48.0975905Z │ 473 │ │ │ │ logger.exception("er │
2025-08-31T12:13:48.0976553Z │ │
2025-08-31T12:13:48.0977225Z │ /opt/psr/.venv/lib/python3.13/site-package │
2025-08-31T12:13:48.0978034Z │ s/semantic_release/helpers.py:143 in │
2025-08-31T12:13:48.0978754Z │ _wrapper │
2025-08-31T12:13:48.0979367Z │ │
2025-08-31T12:13:48.0979965Z │ 140 │ │ │ ) │
2025-08-31T12:13:48.0980581Z │ 141 │ │ │ │
2025-08-31T12:13:48.0981242Z │ 142 │ │ │ # Call function │
2025-08-31T12:13:48.0981903Z │ ❱ 143 │ │ │ result = func(*args, **k │
2025-08-31T12:13:48.0982557Z │ 144 │ │ │ │
2025-08-31T12:13:48.0983203Z │ 145 │ │ │ # Log result │
2025-08-31T12:13:48.0983883Z │ 146 │ │ │ logger.debug("%s -> %s", │
2025-08-31T12:13:48.0984550Z │ │
2025-08-31T12:13:48.0985493Z │ /opt/psr/.venv/lib/python3.13/site-package │
2025-08-31T12:13:48.0986282Z │ s/semantic_release/hvcs/github.py:429 in │
2025-08-31T12:13:48.0987051Z │ upload_release_asset │
2025-08-31T12:13:48.0987716Z │ │
2025-08-31T12:13:48.0988345Z │ 426 │ │ ) │
2025-08-31T12:13:48.0988957Z │ 427 │ │ │
2025-08-31T12:13:48.0989606Z │ 428 │ │ with open(file, "rb") as dat │
2025-08-31T12:13:48.0990550Z │ ❱ 429 │ │ │ response = self.session. │
2025-08-31T12:13:48.0991223Z │ 430 │ │ │ │ url, │
2025-08-31T12:13:48.0992178Z │ 431 │ │ │ │ params={"name": os.p │
2025-08-31T12:13:48.0992727Z │ 432 │ │ │ │ headers={ │
2025-08-31T12:13:48.0993210Z │ │
2025-08-31T12:13:48.0993837Z │ /opt/psr/.venv/lib/python3.13/site-package │
2025-08-31T12:13:48.0994538Z │ s/requests/sessions.py:637 in post │
2025-08-31T12:13:48.0995326Z │ │
2025-08-31T12:13:48.0995850Z │ 634 │ │ :rtype: requests.Response │
2025-08-31T12:13:48.0996389Z │ 635 │ │ """ │
2025-08-31T12:13:48.0996936Z │ 636 │ │ │
2025-08-31T12:13:48.0997514Z │ ❱ 637 │ │ return self.request("POST", │
2025-08-31T12:13:48.0998090Z │ 638 │ │
2025-08-31T12:13:48.0998643Z │ 639 │ def put(self, url, data=None, ** │
2025-08-31T12:13:48.0999237Z │ 640 │ │ r"""Sends a PUT request. Ret │
2025-08-31T12:13:48.1000016Z │ │
2025-08-31T12:13:48.1000688Z │ /opt/psr/.venv/lib/python3.13/site-package │
2025-08-31T12:13:48.1001368Z │ s/requests/sessions.py:589 in request │
2025-08-31T12:13:48.1002011Z │ │
2025-08-31T12:13:48.1002619Z │ 586 │ │ │ "allow_redirects": allow │
2025-08-31T12:13:48.1003231Z │ 587 │ │ } │
2025-08-31T12:13:48.1003753Z │ 588 │ │ send_kwargs.update(settings) │
2025-08-31T12:13:48.1004308Z │ ❱ 589 │ │ resp = self.send(prep, **sen │
2025-08-31T12:13:48.1005042Z │ 590 │ │ │
2025-08-31T12:13:48.1005560Z │ 591 │ │ return resp │
2025-08-31T12:13:48.1006079Z │ 592 │
2025-08-31T12:13:48.1006540Z │ │
2025-08-31T12:13:48.1007080Z │ /opt/psr/.venv/lib/python3.13/site-package │
2025-08-31T12:13:48.1007702Z │ s/requests/sessions.py:710 in send │
2025-08-31T12:13:48.1008259Z │ │
2025-08-31T12:13:48.1008761Z │ 707 │ │ r.elapsed = timedelta(second │
2025-08-31T12:13:48.1009281Z │ 708 │ │ │
2025-08-31T12:13:48.1009810Z │ 709 │ │ # Response manipulation hook │
2025-08-31T12:13:48.1010359Z │ ❱ 710 │ │ r = dispatch_hook("response" │
2025-08-31T12:13:48.1010875Z │ 711 │ │ │
2025-08-31T12:13:48.1011377Z │ 712 │ │ # Persist cookies │
2025-08-31T12:13:48.1011904Z │ 713 │ │ if r.history: │
2025-08-31T12:13:48.1012400Z │ │
2025-08-31T12:13:48.1012931Z │ /opt/psr/.venv/lib/python3.13/site-package │
2025-08-31T12:13:48.1013770Z │ s/requests/hooks.py:30 in dispatch_hook │
2025-08-31T12:13:48.1014300Z │ │
2025-08-31T12:13:48.1014940Z │ 27 │ │ if hasattr(hooks, "__call__") │
2025-08-31T12:13:48.1015451Z │ 28 │ │ │ hooks = [hooks] │
2025-08-31T12:13:48.1015965Z │ 29 │ │ for hook in hooks: │
2025-08-31T12:13:48.1016485Z │ ❱ 30 │ │ │ _hook_data = hook(hook_da │
2025-08-31T12:13:48.1016985Z │ 31 │ │ │ if _hook_data is not None │
2025-08-31T12:13:48.1017480Z │ 32 │ │ │ │ hook_data = _hook_dat │
2025-08-31T12:13:48.1017994Z │ 33 │ return hook_data │
2025-08-31T12:13:48.1018500Z │ │
2025-08-31T12:13:48.1019029Z │ /opt/psr/.venv/lib/python3.13/site-package │
2025-08-31T12:13:48.1019631Z │ s/semantic_release/hvcs/util.py:35 in │
2025-08-31T12:13:48.1020188Z │ <lambda> │
2025-08-31T12:13:48.1020669Z │ │
2025-08-31T12:13:48.1021321Z │ 32 │ """ │
2025-08-31T12:13:48.1021833Z │ 33 │ session = Session() │
2025-08-31T12:13:48.1022360Z │ 34 │ if raise_for_status: │
2025-08-31T12:13:48.1022907Z │ ❱ 35 │ │ session.hooks = {"response": │
2025-08-31T12:13:48.1023425Z │ 36 │ │
2025-08-31T12:13:48.1023911Z │ 37 │ if retry: │
2025-08-31T12:13:48.1024423Z │ 38 │ │ if isinstance(retry, bool): │
2025-08-31T12:13:48.1025071Z │ │
2025-08-31T12:13:48.1025613Z │ /opt/psr/.venv/lib/python3.13/site-package │
2025-08-31T12:13:48.1026233Z │ s/requests/models.py:1026 in │
2025-08-31T12:13:48.1026807Z │ raise_for_status │
2025-08-31T12:13:48.1027307Z │ │
2025-08-31T12:13:48.1027800Z │ 1023 │ │ │ ) │
2025-08-31T12:13:48.1028289Z │ 1024 │ │ │
2025-08-31T12:13:48.1028814Z │ 1025 │ │ if http_error_msg: │
2025-08-31T12:13:48.1029335Z │ ❱ 1026 │ │ │ raise HTTPError(http_er │
2025-08-31T12:13:48.1029853Z │ 1027 │ │
2025-08-31T12:13:48.1030359Z │ 1028 │ def close(self): │
2025-08-31T12:13:48.1030910Z │ 1029 │ │ """Releases the connection │
2025-08-31T12:13:48.1031461Z ╰────────────────────────────────────────────╯
2025-08-31T12:13:48.1031930Z HTTPError: 403 Client Error: Forbidden for
2025-08-31T12:13:48.1032399Z url:
2025-08-31T12:13:48.1032904Z https://uploads.github.com/repos/pawsgineer/b3
2025-08-31T12:13:48.1033707Z d_paws_bakery/releases/243714625/assets?name=p
2025-08-31T12:13:48.1034270Z aws_bakery-0.4.1.zip
2025-08-31T12:13:48.1035069Z [12:13:48] DEBUG Github.upload_dists -> 0 helpers.py:146
Additional context
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingconfirmedPrevent from becoming stalePrevent from becoming stale