From 9059f2896e3e4970ec6e11b1e87bbf6137c32c7e Mon Sep 17 00:00:00 2001 From: Gabriel Burnworth Date: Fri, 13 Sep 2024 14:50:36 -0700 Subject: [PATCH] optimize workflow --- .github/workflows/publish.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a2fa63b..1ed0486 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: Publish Python distribution to PyPI and TestPyPI +name: Publish package on: push @@ -24,7 +24,7 @@ jobs: path: dist/ publish-to-pypi: - name: Publish Python distribution to PyPI + name: Publish to PyPI if: startsWith(github.ref, 'refs/tags/') needs: - build @@ -45,7 +45,7 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 github-release: - name: Upload the Python distribution to GitHub Release + name: Create GitHub Release needs: - publish-to-pypi runs-on: ubuntu-latest @@ -83,7 +83,8 @@ jobs: --repo '${{ github.repository }}' publish-to-testpypi: - name: Publish Python distribution to TestPyPI + name: Publish to TestPyPI + if: ${{ ! startsWith(github.ref, 'refs/tags/') }} needs: - build runs-on: ubuntu-latest