1+ # This file is autogenerated by maturin v1.16.0
2+ # To update, run
3+ #
4+ # maturin generate-ci github
5+ #
16name : Release
27
38on :
49 push :
510 tags :
611 - ' v*'
12+ pull_request :
713 workflow_dispatch :
814
915permissions :
@@ -28,19 +34,19 @@ jobs:
2834 - runner : ubuntu-latest
2935 target : ppc64le
3036 steps :
31- - uses : actions/checkout@v4
32- - uses : actions/setup-python@v5
37+ - uses : actions/checkout@v6
38+ - uses : actions/setup-python@v6
3339 with :
3440 python-version : 3.x
3541 - name : Build wheels
3642 uses : PyO3/maturin-action@v1
3743 with :
3844 target : ${{ matrix.platform.target }}
3945 args : --release --out dist --find-interpreter
40- sccache : ' true '
46+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
4147 manylinux : auto
4248 - name : Upload wheels
43- uses : actions/upload-artifact@v4
49+ uses : actions/upload-artifact@v6
4450 with :
4551 name : wheels-linux-${{ matrix.platform.target }}
4652 path : dist
@@ -59,19 +65,19 @@ jobs:
5965 - runner : ubuntu-latest
6066 target : armv7
6167 steps :
62- - uses : actions/checkout@v4
63- - uses : actions/setup-python@v5
68+ - uses : actions/checkout@v6
69+ - uses : actions/setup-python@v6
6470 with :
6571 python-version : 3.x
6672 - name : Build wheels
6773 uses : PyO3/maturin-action@v1
6874 with :
6975 target : ${{ matrix.platform.target }}
7076 args : --release --out dist --find-interpreter
71- sccache : ' true '
77+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
7278 manylinux : musllinux_1_2
7379 - name : Upload wheels
74- uses : actions/upload-artifact@v4
80+ uses : actions/upload-artifact@v6
7581 with :
7682 name : wheels-musllinux-${{ matrix.platform.target }}
7783 path : dist
@@ -83,22 +89,27 @@ jobs:
8389 platform :
8490 - runner : windows-latest
8591 target : x64
92+ python_arch : x64
8693 - runner : windows-latest
8794 target : x86
95+ python_arch : x86
96+ - runner : windows-11-arm
97+ target : aarch64
98+ python_arch : arm64
8899 steps :
89- - uses : actions/checkout@v4
90- - uses : actions/setup-python@v5
100+ - uses : actions/checkout@v6
101+ - uses : actions/setup-python@v6
91102 with :
92103 python-version : 3.x
93- architecture : ${{ matrix.platform.target }}
104+ architecture : ${{ matrix.platform.python_arch }}
94105 - name : Build wheels
95106 uses : PyO3/maturin-action@v1
96107 with :
97108 target : ${{ matrix.platform.target }}
98109 args : --release --out dist --find-interpreter
99- sccache : ' true '
110+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
100111 - name : Upload wheels
101- uses : actions/upload-artifact@v4
112+ uses : actions/upload-artifact@v6
102113 with :
103114 name : wheels-windows-${{ matrix.platform.target }}
104115 path : dist
@@ -108,53 +119,65 @@ jobs:
108119 strategy :
109120 matrix :
110121 platform :
111- - runner : macos-14
122+ - runner : macos-15-intel
112123 target : x86_64
113- - runner : macos-14
124+ - runner : macos-latest
114125 target : aarch64
115126 steps :
116- - uses : actions/checkout@v4
117- - uses : actions/setup-python@v5
127+ - uses : actions/checkout@v6
128+ - uses : actions/setup-python@v6
118129 with :
119130 python-version : 3.x
120131 - name : Build wheels
121132 uses : PyO3/maturin-action@v1
122133 with :
123134 target : ${{ matrix.platform.target }}
124135 args : --release --out dist --find-interpreter
125- sccache : ' true '
136+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
126137 - name : Upload wheels
127- uses : actions/upload-artifact@v4
138+ uses : actions/upload-artifact@v6
128139 with :
129140 name : wheels-macos-${{ matrix.platform.target }}
130141 path : dist
131142
132143 sdist :
133144 runs-on : ubuntu-latest
134145 steps :
135- - uses : actions/checkout@v4
146+ - uses : actions/checkout@v6
136147 - name : Build sdist
137148 uses : PyO3/maturin-action@v1
138149 with :
139150 command : sdist
140151 args : --out dist
141152 - name : Upload sdist
142- uses : actions/upload-artifact@v4
153+ uses : actions/upload-artifact@v6
143154 with :
144155 name : wheels-sdist
145156 path : dist
146157
147158 release :
148159 name : Release
149160 runs-on : ubuntu-latest
150- if : " startsWith(github.ref, 'refs/tags/')"
161+ if : ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
151162 needs : [linux, musllinux, windows, macos, sdist]
163+ permissions :
164+ # Use to sign the release artifacts
165+ id-token : write
166+ # Used to upload release artifacts
167+ contents : write
168+ # Used to generate artifact attestation
169+ attestations : write
152170 steps :
153- - uses : actions/download-artifact@v4
171+ - uses : actions/download-artifact@v7
172+ - name : Generate artifact attestation
173+ uses : actions/attest@v4
174+ with :
175+ subject-path : ' wheels-*/*'
176+ - name : Install uv
177+ if : ${{ startsWith(github.ref, 'refs/tags/') }}
178+ uses : astral-sh/setup-uv@v7
154179 - name : Publish to PyPI
155- uses : PyO3/maturin-action@v1
180+ if : ${{ startsWith(github.ref, 'refs/tags/') }}
181+ run : uv publish 'wheels-*/*'
156182 env :
157- MATURIN_PYPI_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
158- with :
159- command : upload
160- args : --non-interactive --skip-existing wheels-*/*
183+ UV_PUBLISH_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
0 commit comments