Update publishing workflow based on pypa docs

This commit is contained in:
Laurent Savaëte
2023-03-30 11:52:07 +02:00
parent be74f2a403
commit 5bc70c47d6

View File

@@ -56,9 +56,15 @@ jobs:
if: startsWith(github.ref, 'refs/tags')
run: |
poetry build
- name: Publish distribution 📦 to Test PyPI
# publish to testpypi on all commit just for testing this PR
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
- name: Publish release to PyPI
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
# uses POETRY_REPOSITORIES_TESTPYPI, POETRY_PYPI_TOKEN_TESTPYPI env vars
run: |
poetry publish --repository testpypi
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}