Skip to content

Commit d7cb9b8

Browse files
authored
Merge pull request #40 from dhellmann/6-test-pypi-publish-on-prs
update publishing action settings
2 parents 887ee8a + 6f10553 commit d7cb9b8

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)