diff --git a/.github/workflows/python-publish.yaml b/.github/workflows/python-publish.yaml index bfeb191..75a668f 100644 --- a/.github/workflows/python-publish.yaml +++ b/.github/workflows/python-publish.yaml @@ -28,13 +28,12 @@ jobs: - name: Build sdist and wheel run: | python setup.py sdist bdist_wheel - - name: Publish distribution to Test PyPI - uses: pypa/gh-action-pypi-publish@master - with: - password: ${{ secrets.test_pypi_password }} - repository_url: https://test.pypi.org/legacy/ - name: Publish distribution to PyPI - if: startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@master + # This condition prevents PRs from being published as part of + # the test job. + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@v1.6.4 with: - password: ${{ secrets.pypi_password }} + password: ${{ secrets.PYPI_API_TOKEN }} + verbose: true + print_hash: true