Skip to content

Commit 84e4e4b

Browse files
committed
ci: update PyPI publish workflow to trigger on workflow_run completion
- Add workflow_run trigger to publish workflow so it triggers after CI completes successfully - Add tags to push trigger to catch version tags (v*) - Update build and publish-pypi job conditions to skip regular branch pushes and only trigger on tags/releases/successful CI
1 parent f0706ee commit 84e4e4b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@ on:
1010
release:
1111
types: [published]
1212
push:
13+
branches: [master, main]
1314
tags:
1415
- "v*"
1516

1617
jobs:
1718
build:
1819
runs-on: ubuntu-latest
19-
# Only run if CI succeeded (for workflow_run trigger) or for tags/releases
20+
# Only run if CI succeeded (for workflow_run trigger) or for tags/releases, skip regular branch pushes
2021
if: |
2122
github.event_name == 'release' ||
22-
github.event_name == 'push' ||
23+
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) ||
2324
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
2425
steps:
2526
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)