From 3262b67f8e6123ad0aabc68de2a161e232eb5c86 Mon Sep 17 00:00:00 2001 From: Sven Thiele Date: Thu, 5 Mar 2020 13:17:48 +0100 Subject: [PATCH] change publish to pypi trigger to on release (#11) * change publish to pypi trigger to on release --- .github/workflows/publish-to-test-pypi.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index 0278f98..1040b86 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -1,10 +1,11 @@ -name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI - -on: push +name: Publish Python 🐍 distributions 📦 to PyPI +on: + release: + types: [created] jobs: build-n-publish: - name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI + name: Build and publish Python 🐍 distributions 📦 to PyPI runs-on: ubuntu-18.04 steps: - uses: actions/checkout@master @@ -17,13 +18,8 @@ jobs: python setup.py sdist - - name: Publish distribution 📦 to PyPI - if: startsWith(github.event.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@master - with: - password: ${{ secrets.pypi_password }} - - name: Publish distribution 📦 to Test PyPI + - name: Publish package uses: pypa/gh-action-pypi-publish@master with: - password: ${{ secrets.test_pypi_password }} - repository_url: https://test.pypi.org/legacy/ \ No newline at end of file + user: __token__ + password: ${{ secrets.pypi_password }} \ No newline at end of file