Skip to content

Commit 6fc73d8

Browse files
erichutchinsclaude
andcommitted
ci: gate wheel builds and sdist on tags/workflow_dispatch only
Build jobs were running on every push to main, duplicating work. Tests still run on all pushes; wheel builds only run when releasing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ed46182 commit 6fc73d8

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/publish_to_pypi.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ jobs:
111111
# ------------------------------------------------------------------
112112
build-linux:
113113
name: Build Wheels (${{ matrix.platform.runner }}, ${{ matrix.platform.target }})
114+
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
114115
needs: [test-python, test-os]
115116
runs-on: ${{ matrix.platform.runner }}
116117

@@ -148,6 +149,7 @@ jobs:
148149

149150
build-musllinux:
150151
name: Build Wheels (${{ matrix.platform.runner }}, ${{ matrix.platform.target }})
152+
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
151153
needs: [test-python, test-os]
152154
runs-on: ${{ matrix.platform.runner }}
153155

@@ -185,6 +187,7 @@ jobs:
185187

186188
build-windows:
187189
name: Build Wheels (${{ matrix.platform.runner }}, ${{ matrix.platform.target }})
190+
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
188191
needs: [test-python, test-os]
189192
runs-on: ${{ matrix.platform.runner }}
190193

@@ -220,6 +223,7 @@ jobs:
220223

221224
build-macos:
222225
name: Build Wheels (${{ matrix.platform.runner }}, ${{ matrix.platform.target }})
226+
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
223227
needs: [test-python, test-os]
224228
runs-on: ${{ matrix.platform.runner }}
225229

@@ -257,6 +261,7 @@ jobs:
257261
# ------------------------------------------------------------------
258262
sdist:
259263
name: Build sdist
264+
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
260265
runs-on: ubuntu-latest
261266
steps:
262267
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)