Skip to content

Commit

Permalink
Only publish to pypi when the action is triggered by a tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh5 committed Sep 29, 2023
1 parent 5e1ff96 commit 244d43b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build_all_packages_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ jobs:
build_pypi:

name: Publish package to PyPI
if: startsWith(github.ref, 'refs/tags/')
needs: py_build
runs-on: ubuntu-latest

Expand All @@ -109,7 +110,6 @@ jobs:
# Push the artifacts to PyPI repo
- name: Publish distribution package to PyPI
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 244d43b

Please sign in to comment.