diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 13b4b7c9..5a93cd27 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -370,7 +370,6 @@ jobs: name: Upload release needs: test runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') environment: name: pypi @@ -391,6 +390,13 @@ jobs: - name: Publish PyPI package uses: pypa/gh-action-pypi-publish@release/v1 + if: startsWith(github.ref, 'refs/tags/v') + + - name: Publish TestPyPI package + uses: pypa/gh-action-pypi-publish@release/v1 + if: github.ref == 'refs/heads/test-release' + with: + repository-url: https://test.pypi.org/legacy/ - name: Create GitHub Release uses: softprops/action-gh-release@v2