Skip to content

Commit e64d99c

Browse files
committed
fix(ci): only build wheels on tag push
1 parent 4827cee commit e64d99c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/python.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Python
33
on:
44
push:
55
tags:
6-
- 'python-*'
6+
- "python-*"
77
pull_request:
88
paths:
99
- python/**
@@ -39,6 +39,7 @@ jobs:
3939
run: uv run pytest
4040
linux:
4141
runs-on: ${{ matrix.platform.runner }}
42+
if: startsWith(github.ref, 'refs/tags/python-')
4243
strategy:
4344
matrix:
4445
platform:
@@ -66,7 +67,7 @@ jobs:
6667
with:
6768
target: ${{ matrix.platform.target }}
6869
args: --release --out dist --find-interpreter --manifest-path python/Cargo.toml
69-
sccache: 'true'
70+
sccache: "true"
7071
- name: Upload wheels
7172
uses: actions/upload-artifact@v4
7273
with:
@@ -106,6 +107,7 @@ jobs:
106107

107108
windows:
108109
runs-on: ${{ matrix.platform.runner }}
110+
if: startsWith(github.ref, 'refs/tags/python-')
109111
strategy:
110112
matrix:
111113
platform:
@@ -126,7 +128,7 @@ jobs:
126128
with:
127129
target: ${{ matrix.platform.target }}
128130
args: --release --out dist --find-interpreter --manifest-path python/Cargo.toml
129-
sccache: 'true'
131+
sccache: "true"
130132
- name: Upload wheels
131133
uses: actions/upload-artifact@v4
132134
with:
@@ -135,6 +137,7 @@ jobs:
135137

136138
macos:
137139
runs-on: ${{ matrix.platform.runner }}
140+
if: startsWith(github.ref, 'refs/tags/python-')
138141
strategy:
139142
matrix:
140143
platform:
@@ -154,7 +157,7 @@ jobs:
154157
with:
155158
target: ${{ matrix.platform.target }}
156159
args: --release --out dist --find-interpreter --manifest-path python/Cargo.toml
157-
sccache: 'true'
160+
sccache: "true"
158161
- name: Upload wheels
159162
uses: actions/upload-artifact@v4
160163
with:

0 commit comments

Comments
 (0)