From ea32c612ede3316f9afc4326ffe789ed50032fe8 Mon Sep 17 00:00:00 2001 From: Joaquin Matres <4514346+joamatab@users.noreply.github.com> Date: Sun, 8 May 2022 16:22:16 -0700 Subject: [PATCH] upload to test_pypi unless tag is a new release --- .github/workflows/build.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3ee38cf69..e592a2989 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,11 +74,25 @@ jobs: - uses: actions/upload-artifact@v2 with: path: dist/*.tar.gz - - upload_all: + + upload_to_test_pypy: + needs: [build, make_sdist] + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v2 + with: + name: artifact + path: dist + + - uses: pypa/gh-action-pypi-publish@v1.4.2 + with: + user: __token__ + password: ${{ secrets.test_pypi_password }} + repository_url: https://test.pypi.org/legacy/ + + upload_to_pypi: needs: [build, make_sdist] runs-on: ubuntu-latest - # Uncomment for real PyPi if: github.event_name == 'release' && github.event.action == 'published' steps: - uses: actions/download-artifact@v2 @@ -89,8 +103,4 @@ jobs: - uses: pypa/gh-action-pypi-publish@v1.4.2 with: user: __token__ - # Test PyPI - # password: ${{ secrets.test_pypi_password }} - # repository_url: https://test.pypi.org/legacy/ - # Uncomment for Real Pypi password: ${{ secrets.pypi_password }}