diff --git a/.github/workflows/publish-apishell.yml b/.github/workflows/publish-apishell.yml index b798254..7c5b0eb 100644 --- a/.github/workflows/publish-apishell.yml +++ b/.github/workflows/publish-apishell.yml @@ -42,6 +42,7 @@ jobs: publish-to-pypi: name: Publish Python distro to PyPi + if: (!contains(github.ref, 'refs/tags/*-test')) needs: - build runs-on: ubuntu-latest @@ -60,3 +61,28 @@ jobs: path: dist/ - name: Publish distribution to PyPi uses: pypa/gh-action-pypi-publish@release/v1 + + publish-to-testpypi: + name: Publish Python distro to TestPyPi + if: contains(github.ref, 'refs/tags/*-test') + needs: + - build + runs-on: ubuntu-latest + + environment: + name: testpypi + url: https://test.pypi.org/project/iriusrisk-apishell-v1/ + + permissions: + id-token: write + + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution to TestPyPi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/