Skip to content

Commit 1ed77d2

Browse files
committed
🔧 Fix workflow: Support both tag pushes and releases
- Fixed condition to work with tag pushes - Removed unnecessary repository-url for PyPI - Now supports both 'git tag push' and 'GitHub releases'
1 parent 72919b5 commit 1ed77d2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

‎.github/workflows/publish.yml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,5 @@ jobs:
5656
python -m build
5757
5858
- name: Publish to PyPI (Trusted Publishing)
59-
if: github.event_name == 'release' && github.event.action == 'published'
60-
uses: pypa/gh-action-pypi-publish@release/v1
61-
with:
62-
repository-url: https://upload.pypi.org/legacy/
59+
if: github.event_name == 'release' && github.event.action == 'published' || github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
60+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)