Skip to content

Commit

Permalink
Update publish rule to run on Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
p3zo committed Jun 17, 2024
1 parent 04a0330 commit e879331
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
build:
if: startsWith(github.ref, 'refs/tags/')
if: "contains(github.event.head_commit.message, 'Bump version')"
name: Build distribution
runs-on: ubuntu-latest

Expand All @@ -31,7 +31,7 @@ jobs:
path: dist/

publish-to-pypi:
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
if: "contains(github.event.head_commit.message, 'Bump version')"
name: >-
Publish distribution to PyPI
needs:
Expand All @@ -53,7 +53,7 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1

github-release:
if: startsWith(github.ref, 'refs/tags/')
if: "contains(github.event.head_commit.message, 'Bump version')"
name: >-
Sign the Python distribution with Sigstore
and upload them to GitHub Release
Expand Down

0 comments on commit e879331

Please sign in to comment.