@@ -30,23 +30,16 @@ jobs:
3030
3131 - name : Install dependencies
3232 run : |
33- uv pip install --system setuptools wheel
3433 uv pip install --system -e ".[dev]"
35- python setup.py build_ext --inplace
3634
3735 - name : Run tests
3836 run : pytest tests/
3937
40- build_wheels :
41- name : Build wheels (${{ matrix.os }})
38+ build_wheel :
39+ name : Build pure Python wheel
4240 needs : test
43- if : github.event_name != 'pull_request' || startsWith(github.head_ref, 'fix/build-')
44- runs-on : ${{ matrix.os }}
45- strategy :
46- fail-fast : false
47- matrix :
48- os : [ubuntu-latest, macos-latest]
49-
41+ runs-on : ubuntu-latest
42+ if : startsWith(github.ref, 'refs/tags/v')
5043 steps :
5144 - uses : actions/checkout@v4
5245
5548 with :
5649 python-version : " 3.12"
5750
58- - name : Set up QEMU (for aarch64 wheels)
59- if : runner.os == 'Linux'
60- uses : docker/setup-qemu-action@v3
61- with :
62- platforms : arm64
63-
6451 - name : Set up uv
6552 uses : astral-sh/setup-uv@v3
6653 with :
@@ -112,22 +99,16 @@ jobs:
11299 print(f"Set version to {version}")
113100 PY
114101
115- - name : Install cibuildwheel
116- run : uv pip install --system cibuildwheel
117-
118- - name : Build wheels
119- run : python -m cibuildwheel --output-dir wheelhouse
120- env :
121- CIBW_BUILD : " cp312-*"
122- CIBW_SKIP : " *musllinux*"
123- CIBW_ARCHS_LINUX : " x86_64 aarch64"
124- CIBW_ARCHS_MACOS : " x86_64 arm64"
102+ - name : Build wheel
103+ run : |
104+ uv pip install --system build
105+ python -m build --wheel --outdir dist
125106
126- - name : Upload wheels
107+ - name : Upload wheel
127108 uses : actions/upload-artifact@v4
128109 with :
129- name : wheels-${{ matrix.os }}
130- path : wheelhouse /*.whl
110+ name : wheel
111+ path : dist /*.whl
131112
132113 build_sdist :
133114 name : Build sdist
@@ -207,18 +188,17 @@ jobs:
207188 publish_pypi :
208189 name : Publish to PyPI
209190 runs-on : ubuntu-latest
210- needs : [build_wheels , build_sdist]
191+ needs : [build_wheel , build_sdist]
211192 if : startsWith(github.ref, 'refs/tags/v')
212193 permissions :
213194 id-token : write
214195 contents : write
215196 steps :
216- - name : Download wheels
197+ - name : Download wheel
217198 uses : actions/download-artifact@v4
218199 with :
219- pattern : wheels-*
200+ name : wheel
220201 path : dist
221- merge-multiple : true
222202
223203 - name : Download sdist
224204 uses : actions/download-artifact@v4
0 commit comments