@@ -137,7 +137,7 @@ jobs:
137137 needs :
138138 - build-release-binaries
139139 - release-gate
140- if : ${{ inputs.tag == 'dry-run' && github.repository == 'astral-sh/uv' && github.ref == 'refs/heads/main' }}
140+ if : ${{ github.repository == 'astral-sh/uv' && github.ref == 'refs/heads/main' }}
141141 uses : $/.github/workflows/sign-release-binaries.yml
142142 secrets : inherit
143143 permissions :
@@ -148,6 +148,7 @@ jobs:
148148 needs :
149149 - plan
150150 - build-release-binaries
151+ - sign-release-binaries
151152 if : ${{ needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload' || inputs.tag == 'dry-run' }}
152153 runs-on : " depot-ubuntu-latest-4"
153154 steps :
@@ -162,7 +163,14 @@ jobs:
162163 - name : Fetch local artifacts
163164 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
164165 with :
165- pattern : artifacts-*
166+ # The macOS and Windows archives come from the signing job below.
167+ pattern : " artifacts-!(*-apple-darwin|*-pc-windows-msvc)"
168+ path : target/distrib/
169+ merge-multiple : true
170+ - name : Fetch signed GitHub release archives
171+ uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
172+ with :
173+ artifact-ids : ${{ needs.sign-release-binaries.outputs.github-archives }}
166174 path : target/distrib/
167175 merge-multiple : true
168176 - name : Generate local dist manifest
@@ -191,6 +199,7 @@ jobs:
191199 - build-release-binaries
192200 - build-docker
193201 - generate-checksum-manifest
202+ - sign-release-binaries
194203 runs-on : " depot-ubuntu-latest-4"
195204 env :
196205 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -207,7 +216,13 @@ jobs:
207216 - name : Fetch local artifacts
208217 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
209218 with :
210- pattern : artifacts-*
219+ pattern : " artifacts-!(*-apple-darwin|*-pc-windows-msvc)"
220+ path : target/distrib/
221+ merge-multiple : true
222+ - name : Fetch signed GitHub release archives
223+ uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
224+ with :
225+ artifact-ids : ${{ needs.sign-release-binaries.outputs.github-archives }}
211226 path : target/distrib/
212227 merge-multiple : true
213228 - id : cargo-dist
@@ -238,8 +253,9 @@ jobs:
238253 - build-release-binaries
239254 - build-docker
240255 - build-global-artifacts
241- # Only run if we're "publishing", and only if plan, local and global didn't fail (skipped is fine)
242- if : ${{ always() && needs.plan.result == 'success' && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-release-binaries.result == 'skipped' || needs.build-release-binaries.result == 'success') && (needs.build-docker.result == 'skipped' || needs.build-docker.result == 'success') }}
256+ - sign-release-binaries
257+ # Only run if we're publishing and the required builds and signing succeeded (skipped builds are fine).
258+ if : ${{ always() && needs.plan.result == 'success' && needs.plan.outputs.publishing == 'true' && needs.sign-release-binaries.result == 'success' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-release-binaries.result == 'skipped' || needs.build-release-binaries.result == 'success') && (needs.build-docker.result == 'skipped' || needs.build-docker.result == 'success') }}
243259 env :
244260 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
245261 runs-on : " depot-ubuntu-latest-4"
@@ -257,7 +273,13 @@ jobs:
257273 - name : Fetch artifacts
258274 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
259275 with :
260- pattern : artifacts-*
276+ pattern : " artifacts-!(*-apple-darwin|*-pc-windows-msvc)"
277+ path : target/distrib/
278+ merge-multiple : true
279+ - name : Fetch signed GitHub release archives
280+ uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
281+ with :
282+ artifact-ids : ${{ needs.sign-release-binaries.outputs.github-archives }}
261283 path : target/distrib/
262284 merge-multiple : true
263285 # This is a harmless no-op for GitHub Releases, hosting for that happens in "publish-github"
@@ -282,10 +304,13 @@ jobs:
282304 - plan
283305 - host
284306 - release-gate
307+ - sign-release-binaries
285308 if : ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}
286309 uses : $/.github/workflows/publish-pypi.yml
287310 with :
288311 plan : ${{ needs.plan.outputs.val }}
312+ uv-wheels : ${{ needs.sign-release-binaries.outputs.uv-wheels }}
313+ uv-build-wheels : ${{ needs.sign-release-binaries.outputs.uv-build-wheels }}
289314 secrets : inherit
290315 # publish jobs get escalated permissions
291316 permissions :
@@ -315,11 +340,12 @@ jobs:
315340 - host
316341 - release-gate
317342 - publish-pypi
343+ - sign-release-binaries
318344 # use "always() && ..." to allow publish jobs to skip themselves (for prereleases).
319345 # "host" however must run to completion, no skipping allowed!
320346 # `publish-crates` is intentionally not a dependency: it's not
321347 # critical to the release and isn't idempotent on retry.
322- if : ${{ always() && needs.host.result == 'success' && needs.release-gate.result == 'success' && (needs.publish-pypi.result == 'skipped' || needs.publish-pypi.result == 'success') }}
348+ if : ${{ always() && needs.host.result == 'success' && needs.release-gate.result == 'success' && needs.sign-release-binaries.result == 'success' && (needs.publish-pypi.result == 'skipped' || needs.publish-pypi.result == 'success') }}
323349 runs-on : " ubuntu-latest"
324350 environment :
325351 name : release
@@ -336,7 +362,13 @@ jobs:
336362 - name : " Download GitHub Artifacts"
337363 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
338364 with :
339- pattern : artifacts-*
365+ pattern : " artifacts-!(*-apple-darwin|*-pc-windows-msvc)"
366+ path : artifacts
367+ merge-multiple : true
368+ - name : " Download signed GitHub release archives"
369+ uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
370+ with :
371+ artifact-ids : ${{ needs.sign-release-binaries.outputs.github-archives }}
340372 path : artifacts
341373 merge-multiple : true
342374 - name : Cleanup
@@ -403,10 +435,12 @@ jobs:
403435 needs :
404436 - plan
405437 - publish-github
406- if : ${{ always() && needs.publish-github.result == 'success' }}
438+ - sign-release-binaries
439+ if : ${{ always() && needs.publish-github.result == 'success' && needs.sign-release-binaries.result == 'success' }}
407440 uses : $/.github/workflows/publish-mirror.yml
408441 with :
409442 plan : ${{ needs.plan.outputs.val }}
443+ github-archives : ${{ needs.sign-release-binaries.outputs.github-archives }}
410444 secrets : inherit
411445 permissions :
412446 " contents " : " read"
0 commit comments