Skip to content

Commit 6f10553

Browse files
committed
update pypi publishing action
* update publishing action using latest instructions in https://github.com/marketplace/actions/pypi-publish * add debug info * change secret names to match docs * remove test upload (secret are not available in PR jobs, see https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)
1 parent 887ee8a commit 6f10553

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/workflows/python-publish.yaml

+7-8
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,12 @@ jobs:
2828
- name: Build sdist and wheel
2929
run: |
3030
python setup.py sdist bdist_wheel
31-
- name: Publish distribution to Test PyPI
32-
uses: pypa/gh-action-pypi-publish@master
33-
with:
34-
password: ${{ secrets.test_pypi_password }}
35-
repository_url: https://test.pypi.org/legacy/
3631
- name: Publish distribution to PyPI
37-
if: startsWith(github.ref, 'refs/tags')
38-
uses: pypa/gh-action-pypi-publish@master
32+
# This condition prevents PRs from being published as part of
33+
# the test job.
34+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
35+
uses: pypa/[email protected]
3936
with:
40-
password: ${{ secrets.pypi_password }}
37+
password: ${{ secrets.PYPI_API_TOKEN }}
38+
verbose: true
39+
print_hash: true

0 commit comments

Comments
 (0)