From 0903e672ebbbbb88ee7b75f5f231338c96a781e8 Mon Sep 17 00:00:00 2001 From: Darren Eberly Date: Thu, 11 Aug 2022 00:38:34 -0400 Subject: [PATCH] Remove development pypi, only publish releases --- .github/workflows/publish-to-pypi.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 3126f43..5faeb7c 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -1,11 +1,14 @@ -name: Publish Python distribution to PyPI and TestPyPI +name: Publish to PyPI -on: push +on: + release: + types: [published] jobs: build-n-publish: - name: Build and Publish Python distribution to PyPI and TestPyPI + name: Build and Publish to PyPI runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags') steps: - uses: actions/checkout@master - name: Set up Python 3.10 @@ -18,13 +21,7 @@ jobs: - name: Build a binary wheel and a source tarball run: >- python -m build --sdist --wheel --outdir dist/ - - name: Publish Distribution to Test PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.TESTPYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ - name: Publish Distribution to PyPI - if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file