24
24
- uses : actions/checkout@v4
25
25
- uses : actions/setup-python@v5
26
26
with :
27
- python-version : ' 3.10 '
27
+ python-version : ' 3'
28
28
- run : pip install pre-commit
29
29
name : Install pre-commit
30
30
- run : pre-commit run --all
35
35
fail-fast : false
36
36
matrix :
37
37
os : [ubuntu-22.04, macos-13, windows-latest ]
38
- python_version : ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10']
38
+ python_version : ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', ' pypy-3.7', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10']
39
39
runs-on : ${{ matrix.os }}
40
40
steps :
41
41
- uses : actions/checkout@v4
@@ -124,7 +124,7 @@ jobs:
124
124
strategy :
125
125
fail-fast : false
126
126
matrix :
127
- target : [x86_64, aarch64, armv7, s390x, ppc64le, ppc64]
127
+ target : [x86_64, aarch64, armv7, s390x, ppc64le, ppc64, i686 ]
128
128
python_version : ['3.10', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10', '3.13t']
129
129
manylinux : ['auto', 'musllinux_1_1']
130
130
exclude :
@@ -156,10 +156,10 @@ jobs:
156
156
manylinux : ${{ matrix.manylinux }}
157
157
docker-options : -e UNSAFE_PYO3_SKIP_VERSION_CHECK=1
158
158
- name : Upload wheels
159
- uses : actions/upload-artifact@v3
159
+ uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
160
160
with :
161
- name : wheels
162
- path : dist
161
+ name : wheels-linux-${{ matrix.manylinux }}-${{ matrix.target }}-${{ matrix.python_version }}
162
+ path : dist/*.whl
163
163
164
164
windows :
165
165
needs :
@@ -170,7 +170,7 @@ jobs:
170
170
strategy :
171
171
fail-fast : false
172
172
matrix :
173
- target : [x64, aarch64]
173
+ target : [x64, aarch64, x86 ]
174
174
python_version : ['3.10', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10', '3.13t']
175
175
exclude :
176
176
- target : aarch64
@@ -181,13 +181,23 @@ jobs:
181
181
python_version : ' pypy-3.9'
182
182
- target : aarch64
183
183
python_version : ' pypy-3.10'
184
+ - target : x86
185
+ python_version : ' pypy-3.7'
186
+ - target : x86
187
+ python_version : ' pypy-3.8'
188
+ - target : x86
189
+ python_version : ' pypy-3.9'
190
+ - target : x86
191
+ python_version : ' pypy-3.10'
192
+ - target : x86
193
+ python_version : ' 3.13t'
184
194
steps :
185
195
- uses : actions/checkout@v4
186
196
- uses : actions/setup-python@v5
187
197
if : matrix.python_version != '3.13t'
188
198
with :
189
199
python-version : ${{ matrix.python_version }}
190
- architecture : x64
200
+ architecture : ${{ matrix.target == 'x86' && 'x86' || ' x64' }}
191
201
- uses : Quansight-Labs/setup-python@v5
192
202
if : matrix.python_version == '3.13t' && matrix.target == 'x64'
193
203
with :
@@ -212,10 +222,10 @@ jobs:
212
222
args : --release --out dist -i 3.13t
213
223
sccache : ' true'
214
224
- name : Upload wheels
215
- uses : actions/upload-artifact@v3
225
+ uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
216
226
with :
217
- name : wheels
218
- path : dist
227
+ name : wheels-windows-${{ matrix.target }}-${{ matrix.python_version }}
228
+ path : dist/*.whl
219
229
220
230
macos :
221
231
needs :
@@ -247,10 +257,10 @@ jobs:
247
257
args : --release --out dist --interpreter ${{ matrix.python_version }}
248
258
sccache : ' true'
249
259
- name : Upload wheels
250
- uses : actions/upload-artifact@v3
260
+ uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
251
261
with :
252
- name : wheels
253
- path : dist
262
+ name : wheels-macos-${{ matrix.target }}-${{ matrix.python_version }}
263
+ path : dist/*.whl
254
264
255
265
sdist :
256
266
needs :
@@ -268,10 +278,10 @@ jobs:
268
278
command : sdist
269
279
args : --out dist
270
280
- name : Upload sdist
271
- uses : actions/upload-artifact@v3
281
+ uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
272
282
with :
273
- name : wheels
274
- path : dist
283
+ name : wheels-sdist
284
+ path : dist/*.tar.gz
275
285
276
286
universal :
277
287
needs :
@@ -291,25 +301,25 @@ jobs:
291
301
- name : Build fallback wheel
292
302
run : python -m build
293
303
- name : Upload sdist
294
- uses : actions/upload-artifact@v3
304
+ uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
295
305
with :
296
- name : wheels
306
+ name : wheels-universal
297
307
path : dist/*.whl
298
308
299
309
checksum :
300
310
name : compute hashes
301
311
runs-on : ubuntu-22.04
302
312
needs : [linux, windows, macos, sdist, universal]
303
- if : " startsWith(github.ref, 'refs/tags/')"
304
313
outputs :
305
314
hashes : ${{ steps.compute.outputs.hashes }}
306
315
steps :
307
316
- uses : actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
308
317
- name : Download distributions
309
- uses : actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
318
+ uses : actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
310
319
with :
311
- name : wheels
320
+ pattern : wheels-*
312
321
path : dist
322
+ merge-multiple : true
313
323
- name : Collected dists
314
324
run : |
315
325
tree dist
@@ -339,12 +349,20 @@ jobs:
339
349
environment : pypi
340
350
permissions :
341
351
id-token : write
352
+ contents : write
342
353
steps :
343
- - uses : actions/download-artifact@v3
354
+ - name : Download distributions
355
+ uses : actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
344
356
with :
345
- name : wheels
357
+ pattern : wheels-*
358
+ path : dist
359
+ merge-multiple : true
360
+ - name : " Upload dists to GitHub Release"
361
+ env :
362
+ GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
363
+ run : |
364
+ gh release upload ${{ github.ref_name }} dist/* --repo ${{ github.repository }}
346
365
- name : Publish to PyPI
347
- uses : PyO3/maturin -action@v1
366
+ uses : " pypa/gh -action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70 " # v1.12.3
348
367
with :
349
- command : upload
350
- args : --non-interactive --skip-existing *
368
+ attestations : true
0 commit comments