File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11name : Deploy | Publish Pypi Packages
22
33on :
4+ workflow_dispatch :
45 push :
56 branches :
67 - ' **' # All branches for Test PyPI
9293 Move-Item -Path pyproject.toml.bak -Destination pyproject.toml -Force
9394
9495 - name : Build package for PyPI
95- if : startsWith(github.ref, 'refs/tags/')
96+ if : startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
9697 run : |
9798 python -m build
9899
@@ -112,8 +113,8 @@ jobs:
112113 # Upload with verbose output for debugging
113114 twine upload --skip-existing --verbose --repository-url https://test.pypi.org/legacy/ dist/*
114115
115- - name : Publish to PyPI (new tag)
116- if : startsWith(github.ref, 'refs/tags/')
116+ - name : Publish to PyPI (new tag or workflow dispatch )
117+ if : startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
117118 env :
118119 TWINE_USERNAME : __token__
119120 TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
You can’t perform that action at this time.
0 commit comments