Skip to content

Commit

Permalink
Update GitHub Actions workflow to publish to PyPI only on main branch…
Browse files Browse the repository at this point in the history
… tag pushes
  • Loading branch information
Diego Piccinotti committed Oct 23, 2024
1 parent acd7a35 commit 1f9696a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test_build_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
if: startsWith(github.ref, 'refs/tags/') && github.ref_name == 'main' # only publish to PyPI on tag pushes and if the branch is main
needs:
- build
runs-on: ubuntu-latest
Expand Down

0 comments on commit 1f9696a

Please sign in to comment.