From 5bc70c47d618a2c7ea83d1179face3392586365d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20Sava=C3=ABte?= Date: Thu, 30 Mar 2023 11:52:07 +0200 Subject: [PATCH] Update publishing workflow based on pypa docs --- .github/workflows/python-package.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index d023273..7235080 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -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 }}