Skip to content

Commit

Permalink
Update build-and-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cobycloud authored Nov 7, 2024
1 parent b442ab8 commit 7340f2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- master
tags:
- 'v*' # Trigger on tags that start with "v"
pull_request:
branches:
- master
Expand Down Expand Up @@ -61,7 +63,7 @@ jobs:
continue-on-error: true

- name: Publish to PyPI
if: github.ref == 'refs/heads/master'
if: startsWith(github.ref, 'refs/tags/v')
uses: pypa/[email protected]
env:
POETRY_PYPI_USERNAME: ${{ secrets.POETRY_PYPI_USERNAME }}
Expand Down

0 comments on commit 7340f2f

Please sign in to comment.