Skip to content

Commit b879be5

Browse files
authored
Update python-publish.yml
1 parent 81795da commit b879be5

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/python-publish.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,16 @@ jobs:
2222
run: |
2323
python -m pip install --upgrade pip
2424
pip install setuptools wheel twine
25-
- name: Build and publish
26-
env:
27-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
29-
run: |
3025
python setup.py sdist bdist_wheel
31-
twine upload dist/*
26+
27+
- name: Publish distribution 📦 to Test PyPI
28+
uses: pypa/gh-action-pypi-publish@master
29+
with:
30+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
31+
repository_url: https://test.pypi.org/legacy/
32+
- name: Publish distribution 📦 to PyPI
33+
if: startsWith(github.ref, 'refs/tags')
34+
uses: pypa/gh-action-pypi-publish@master
35+
with:
36+
password: ${{ secrets.PYPI_API_TOKEN }}
37+

0 commit comments

Comments
 (0)