1010 types :
1111 - published
1212
13+ env :
14+ FORCE_COLOR : 3
15+
16+ concurrency :
17+ group : ${{ github.workflow }}-${{ github.ref }}
18+ cancel-in-progress : true
19+
1320jobs :
1421 build_sdist :
1522 name : Build SDist
1623 runs-on : ubuntu-latest
1724 steps :
18- - uses : actions/checkout@v4
25+ - uses : actions/checkout@v6
1926 with :
2027 submodules : true
2128
2532 - name : Check metadata
2633 run : pipx run twine check dist/*
2734
28- - uses : actions/upload-artifact@v4
35+ - uses : actions/upload-artifact@v7
2936 with :
3037 name : cibw-sdist
3138 path : dist/*.tar.gz
@@ -37,23 +44,22 @@ jobs:
3744 strategy :
3845 fail-fast : false
3946 matrix :
40- os : [ubuntu-latest, windows-latest, macos-13 ]
47+ os : [ubuntu-latest, macos-15-intel, macos-latest, windows-latest, ubuntu-24.04-arm, windows-11-arm ]
4148
4249 steps :
43- - uses : actions/checkout@v4
50+ - uses : actions/checkout@v6
4451 with :
4552 submodules : true
4653
47- - uses : pypa/cibuildwheel@v2.17
48- env :
49- CIBW_ARCHS_MACOS : auto universal2
54+ - uses : astral-sh/setup-uv@v8.0.0
55+
56+ - uses : pypa/cibuildwheel@v3.4
5057
5158 - name : Verify clean directory
5259 run : git diff --exit-code
5360 shell : bash
5461
55- - name : Upload wheels
56- uses : actions/upload-artifact@v4
62+ - uses : actions/upload-artifact@v7
5763 with :
5864 name : cibw-wheels-${{ matrix.os }}
5965 path : wheelhouse/*.whl
@@ -64,18 +70,25 @@ jobs:
6470 needs : [build_wheels, build_sdist]
6571 runs-on : ubuntu-latest
6672 if : github.event_name == 'release' && github.event.action == 'published'
73+ environment : pypi
74+ permissions :
75+ id-token : write
76+ attestations : write
6777
6878 steps :
69- - uses : actions/setup-python@v5
79+ - uses : actions/setup-python@v6
7080 with :
7181 python-version : " 3.x"
7282
73- - uses : actions/download-artifact@v4
83+ - uses : actions/download-artifact@v8
7484 with :
7585 pattern : cibw-*
76- path : dist
7786 merge-multiple : true
87+ path : dist
7888
79- - uses : pypa/gh-action-pypi-publish@release/v1
89+ - name : Generate artifact attestation for sdist and wheels
90+ uses : actions/attest-build-provenance@v4
8091 with :
81- password : ${{ secrets.pypi_password }}
92+ subject-path : " dist/*"
93+
94+ - uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments