File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ permissions:
2020 contents : write
2121 pull-requests : write
2222 issues : write
23+ id-token : write # Required for PyPI Trusted Publishing
2324
2425jobs :
2526 release :
@@ -244,13 +245,15 @@ jobs:
244245 env :
245246 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
246247
247- - name : Publish to PyPI (optional)
248+ - name : Build package
248249 if : success()
249- continue-on-error : true
250250 run : |
251- pip install build twine
251+ pip install build
252252 python -m build
253- python -m twine upload dist/* --skip-existing
254- env :
255- TWINE_USERNAME : __token__
256- TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
253+
254+ - name : Publish to PyPI (Trusted Publishing)
255+ if : success()
256+ uses : pypa/gh-action-pypi-publish@release/v1
257+ with :
258+ skip-existing : true
259+ verbose : true
You can’t perform that action at this time.
0 commit comments