From 49a6436c58f5e12b5ef769d58023e40c88aac055 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Tue, 1 Sep 2020 13:10:07 -0700 Subject: [PATCH 1/2] remove test pypi, add tag restriction --- .../workflows/publish-to-pypi-testpypi.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish-to-pypi-testpypi.yml b/.github/workflows/publish-to-pypi-testpypi.yml index 4834d5540c..e404ca7d5d 100644 --- a/.github/workflows/publish-to-pypi-testpypi.yml +++ b/.github/workflows/publish-to-pypi-testpypi.yml @@ -1,10 +1,15 @@ -name: Publish distributions to PyPI (releases only) and TestPyPI (all commits) +name: Publish distributions to PyPI -on: push +# if this workflow is modified to be a generic CI workflow then +# add an if statement to the publish step so it only runs on tags. +on: + push: + tags: + - "v*" jobs: build-n-publish: - name: Build and publish distributions to PyPI (releases only) and TestPyPI (all commits) + name: Build and publish distributions to PyPI if: github.repository == 'pvlib/pvlib-python' runs-on: ubuntu-latest steps: @@ -26,15 +31,7 @@ jobs: - name: Build packages run: python setup.py sdist bdist_wheel - - name: Publish distribution to Test PyPI - uses: pypa/gh-action-pypi-publish@master - with: - user: __token__ - password: ${{ secrets.test_pypi_password }} - repository_url: https://test.pypi.org/legacy/ - - name: Publish distribution to PyPI - if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@master with: user: __token__ From 3ce4f65f5121183f0aab607fd22f3d43a1cd592e Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Tue, 1 Sep 2020 13:11:01 -0700 Subject: [PATCH 2/2] rename --- .github/workflows/{publish-to-pypi-testpypi.yml => publish.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{publish-to-pypi-testpypi.yml => publish.yml} (100%) diff --git a/.github/workflows/publish-to-pypi-testpypi.yml b/.github/workflows/publish.yml similarity index 100% rename from .github/workflows/publish-to-pypi-testpypi.yml rename to .github/workflows/publish.yml