From c9071dffac120305ef57b981752c373752c522aa Mon Sep 17 00:00:00 2001 From: Joaquin Matres <4514346+joamatab@users.noreply.github.com> Date: Thu, 5 May 2022 20:03:06 -0700 Subject: [PATCH 1/3] switch to real pypi --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d7a21dd34..4e0e57df13 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -90,7 +90,7 @@ jobs: with: user: __token__ # Test PyPI - password: ${{ secrets.test_pypi_password }} - repository_url: https://test.pypi.org/legacy/ + # password: ${{ secrets.test_pypi_password }} + # repository_url: https://test.pypi.org/legacy/ # Uncomment for Real Pypi - # password: ${{ secrets.pypi_password }} + password: ${{ secrets.pypi_password }} From 8b51e809ddb5f78390d201e0f3f9b1e489b7aa94 Mon Sep 17 00:00:00 2001 From: Joaquin Matres <4514346+joamatab@users.noreply.github.com> Date: Fri, 6 May 2022 09:04:55 -0700 Subject: [PATCH 2/3] avoid building wheels for every commit --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e0e57df13..3ee38cf693 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,7 +79,7 @@ jobs: needs: [build, make_sdist] runs-on: ubuntu-latest # Uncomment for real PyPi - # if: github.event_name == 'release' && github.event.action == 'published' + if: github.event_name == 'release' && github.event.action == 'published' steps: - uses: actions/download-artifact@v2 with: 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 3/3] upload to test_pypi unless tag is a new release --- .github/workflows/build.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3ee38cf693..e592a29899 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_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_all: + 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 }}