Skip to content

Commit

Permalink
fix: only run hooks on tag push to main
Browse files Browse the repository at this point in the history
  • Loading branch information
ivo-facoco authored Dec 2, 2024
1 parent 7ff6772 commit 451dd07
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
name: Upload Python Package

on:
push:
branches:
- "main"
release:
types: [published]

Expand All @@ -17,8 +20,8 @@ permissions:

jobs:
release-build:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

Expand All @@ -39,6 +42,7 @@ jobs:
path: dist/

pypi-publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
timeout-minutes: 5
needs:
Expand Down

0 comments on commit 451dd07

Please sign in to comment.