Skip to content

Commit

Permalink
CI: only run the publish job on tag push
Browse files Browse the repository at this point in the history
  • Loading branch information
mportesdev committed Feb 26, 2025
1 parent dd88396 commit e0788c6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:

publish:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: [test, build]
env:
VERSION: ${{ needs.test.outputs.version }}
Expand All @@ -93,11 +94,9 @@ jobs:

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags/')

- name: Create GitHub release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: version ${{ env.VERSION }}
files: 'dist/*'

0 comments on commit e0788c6

Please # to comment.