Skip to content

Commit 911f3a2

Browse files
zaniebotzanieb
andauthored
Refactor release artifact handling (#21556)
On top of #21447, give original build outputs and completed release artifacts distinct names. Assemble every target into one release set, using signed macOS and Windows replacements and copying Linux artifacts and sdists unchanged. Publication downloads the complete release artifacts by explicit ID. Python publication uploads the assembled wheels and sdists; GitHub publication uses cargo-dist's asset list. Distribution filenames and release URLs are unchanged. The flow is: ```text cargo-dist plan → dist-manifest-plan-<r> build-release-binaries ├── build-wheels-<package>-<target> ├── build-sdist-<package> └── build-github-archives-<target> └── SBOM inspection prepare signing inputs from the original distributions ├── signing-assembly-inputs-<r> (all original distributions) └── unsigned-binaries-<system>-<r> └── sign and notarize └── signed-binaries-<system>-<r> assemble original distributions and signed replacements ├── signed-wheels-<system>-<r> (native verification) ├── release-wheels-<package>-<r> (all targets) ├── release-sdist-<package>-<r> └── release-github-archives-<r> (all targets) native verification succeeds └── cargo-dist: local manifest, installers, checksums ├── dist-manifest-local-<r> ├── release-github-global-<r> ├── dist-manifest-global-<r> └── host: release-github-manifest-<r> ├── Python publication: exact wheel and sdist IDs └── GitHub publication: exact IDs and manifest asset list └── mirror: same artifact IDs, existing R2 file filters ``` Here `<package>` is `uv` or `uv_build`, `<system>` is `macos` or `windows`, and `<r>` is `<run-id>-<run-attempt>`. The names below are relative to #21447: | Previous name | New name | | --- | --- | | `wheels_<package>-<target>` | `build-wheels-<package>-<target>` | | `wheels_<package>-sdist` | `build-sdist-<package>` | | `artifacts-<target>` | `build-github-archives-<target>` | | `unsigned-<system>-<r>` | `unsigned-binaries-<system>-<r>` | | `signing-assembly-<r>` | `signing-assembly-inputs-<r>` | | `signed-<system>-<r>` | `signed-binaries-<system>-<r>` | | `signed-<system>-wheels-<r>` | `signed-wheels-<system>-<r>` | | `signed-uv-wheels-<r>`, `signed-uv-build-wheels-<r>` | `release-wheels-<package>-<r>`; now includes every target | | No assembled sdist artifact | `release-sdist-<package>-<r>` | | `signed-github-release-archives-<r>` | `release-github-archives-<r>`; now includes every target | | `artifacts-plan-dist-manifest` | `dist-manifest-plan-<r>` | | `artifacts-build-local-manifest` | `dist-manifest-local-<r>` | | `artifacts-build-global` | `release-github-global-<r>` and `dist-manifest-global-<r>` | | `artifacts-dist-manifest` | `release-github-manifest-<r>` | The intermediate cargo-dist manifests stay separate from publication files. The manual release helper selects the three GitHub artifacts associated with the latest hosted manifest, allowing successful producer jobs to come from earlier attempts, and publishes only the manifest's asset list. --------- Co-authored-by: Zanie Blue <[email protected]>
1 parent a712e81 commit 911f3a2

12 files changed

Lines changed: 429 additions & 162 deletions

‎.github/workflows/build-release-binaries.yml‎

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Build uv on all platforms.
22
#
33
# Generates both wheels (for PyPI) and archived binaries (for GitHub releases).
4+
# Creates `build-wheels-*`, `build-sdist-*`, and `build-github-archives-*` artifacts.
45
#
56
# Called from:
67
# - .github/workflows/ci.yml (when release-relevant files change)
@@ -76,7 +77,7 @@ jobs:
7677
- name: "Upload sdist"
7778
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
7879
with:
79-
name: wheels_uv-sdist
80+
name: build-sdist-uv
8081
path: dist
8182

8283
# uv-build
@@ -104,7 +105,7 @@ jobs:
104105
- name: "Upload sdist uv-build"
105106
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
106107
with:
107-
name: wheels_uv_build-sdist
108+
name: build-sdist-uv_build
108109
path: crates/uv-build/dist
109110

110111
macos-x86_64:
@@ -142,7 +143,7 @@ jobs:
142143
- name: "Upload wheels"
143144
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
144145
with:
145-
name: wheels_uv-x86_64-apple-darwin
146+
name: build-wheels-uv-x86_64-apple-darwin
146147
path: dist
147148
- name: "Archive binary"
148149
run: |
@@ -158,7 +159,7 @@ jobs:
158159
- name: "Upload binary"
159160
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
160161
with:
161-
name: artifacts-x86_64-apple-darwin
162+
name: build-github-archives-x86_64-apple-darwin
162163
path: |
163164
*.tar.gz
164165
*.sha256
@@ -179,7 +180,7 @@ jobs:
179180
- name: "Upload wheels uv-build"
180181
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
181182
with:
182-
name: wheels_uv_build-x86_64-apple-darwin
183+
name: build-wheels-uv_build-x86_64-apple-darwin
183184
path: crates/uv-build/dist
184185

185186
macos-aarch64:
@@ -238,7 +239,7 @@ jobs:
238239
- name: "Upload wheels"
239240
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
240241
with:
241-
name: wheels_uv-aarch64-apple-darwin
242+
name: build-wheels-uv-aarch64-apple-darwin
242243
path: dist
243244
- name: "Archive binary"
244245
run: |
@@ -254,7 +255,7 @@ jobs:
254255
- name: "Upload binary"
255256
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
256257
with:
257-
name: artifacts-aarch64-apple-darwin
258+
name: build-github-archives-aarch64-apple-darwin
258259
path: |
259260
*.tar.gz
260261
*.sha256
@@ -280,7 +281,7 @@ jobs:
280281
- name: "Upload wheels uv-build"
281282
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
282283
with:
283-
name: wheels_uv_build-aarch64-apple-darwin
284+
name: build-wheels-uv_build-aarch64-apple-darwin
284285
path: crates/uv-build/dist
285286

286287
windows:
@@ -387,7 +388,7 @@ jobs:
387388
- name: "Upload wheels"
388389
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
389390
with:
390-
name: wheels_uv-${{ matrix.platform.target }}
391+
name: build-wheels-uv-${{ matrix.platform.target }}
391392
path: dist
392393
- name: "Archive binary"
393394
shell: bash
@@ -402,7 +403,7 @@ jobs:
402403
- name: "Upload binary"
403404
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
404405
with:
405-
name: artifacts-${{ matrix.platform.target }}
406+
name: build-github-archives-${{ matrix.platform.target }}
406407
path: |
407408
*.zip
408409
*.sha256
@@ -428,7 +429,7 @@ jobs:
428429
- name: "Upload wheels uv-build"
429430
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
430431
with:
431-
name: wheels_uv_build-${{ matrix.platform.target }}
432+
name: build-wheels-uv_build-${{ matrix.platform.target }}
432433
path: crates/uv-build/dist
433434

434435
test-windows-aarch64:
@@ -443,7 +444,7 @@ jobs:
443444
architecture: arm64
444445
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
445446
with:
446-
pattern: wheels_*-aarch64-pc-windows-msvc
447+
pattern: build-wheels-*-aarch64-pc-windows-msvc
447448
path: dist
448449
merge-multiple: true
449450
- name: "Test wheel"
@@ -541,7 +542,7 @@ jobs:
541542
- name: "Upload wheels"
542543
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
543544
with:
544-
name: wheels_uv-${{ matrix.target }}
545+
name: build-wheels-uv-${{ matrix.target }}
545546
path: dist
546547
- name: "Archive binary"
547548
shell: bash
@@ -559,7 +560,7 @@ jobs:
559560
- name: "Upload binary"
560561
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
561562
with:
562-
name: artifacts-${{ matrix.target }}
563+
name: build-github-archives-${{ matrix.target }}
563564
path: |
564565
*.tar.gz
565566
*.sha256
@@ -587,7 +588,7 @@ jobs:
587588
- name: "Upload wheels uv-build"
588589
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
589590
with:
590-
name: wheels_uv_build-${{ matrix.target }}
591+
name: build-wheels-uv_build-${{ matrix.target }}
591592
path: crates/uv-build/dist
592593

593594
linux-arm:
@@ -685,7 +686,7 @@ jobs:
685686
- name: "Upload wheels"
686687
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
687688
with:
688-
name: wheels_uv-${{ matrix.platform.target }}
689+
name: build-wheels-uv-${{ matrix.platform.target }}
689690
path: dist
690691
- name: "Archive binary"
691692
shell: bash
@@ -703,7 +704,7 @@ jobs:
703704
- name: "Upload binary"
704705
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
705706
with:
706-
name: artifacts-${{ matrix.platform.target }}
707+
name: build-github-archives-${{ matrix.platform.target }}
707708
path: |
708709
*.tar.gz
709710
*.sha256
@@ -739,7 +740,7 @@ jobs:
739740
- name: "Upload wheels uv-build"
740741
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
741742
with:
742-
name: wheels_uv_build-${{ matrix.platform.target }}
743+
name: build-wheels-uv_build-${{ matrix.platform.target }}
743744
path: crates/uv-build/dist
744745

745746
# Like `linux-arm`.
@@ -802,7 +803,7 @@ jobs:
802803
- name: "Upload wheels"
803804
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
804805
with:
805-
name: wheels_uv-${{ matrix.platform.target }}
806+
name: build-wheels-uv-${{ matrix.platform.target }}
806807
path: dist
807808
- name: "Archive binary"
808809
shell: bash
@@ -820,7 +821,7 @@ jobs:
820821
- name: "Upload binary"
821822
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
822823
with:
823-
name: artifacts-${{ matrix.platform.target }}
824+
name: build-github-archives-${{ matrix.platform.target }}
824825
path: |
825826
*.tar.gz
826827
*.sha256
@@ -856,7 +857,7 @@ jobs:
856857
- name: "Upload wheels uv-build"
857858
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
858859
with:
859-
name: wheels_uv_build-${{ matrix.platform.target }}
860+
name: build-wheels-uv_build-${{ matrix.platform.target }}
860861
path: crates/uv-build/dist
861862

862863
# Like `linux-arm`, but install the `gcc-powerpc64-linux-gnu` package.
@@ -925,7 +926,7 @@ jobs:
925926
- name: "Upload wheels"
926927
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
927928
with:
928-
name: wheels_uv-${{ matrix.platform.target }}
929+
name: build-wheels-uv-${{ matrix.platform.target }}
929930
path: dist
930931
- name: "Archive binary"
931932
shell: bash
@@ -943,7 +944,7 @@ jobs:
943944
- name: "Upload binary"
944945
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
945946
with:
946-
name: artifacts-${{ matrix.platform.target }}
947+
name: build-github-archives-${{ matrix.platform.target }}
947948
path: |
948949
*.tar.gz
949950
*.sha256
@@ -972,7 +973,7 @@ jobs:
972973
- name: "Upload wheels uv-build"
973974
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
974975
with:
975-
name: wheels_uv_build-${{ matrix.platform.target }}
976+
name: build-wheels-uv_build-${{ matrix.platform.target }}
976977
path: crates/uv-build/dist
977978

978979
# Like `linux-arm`.
@@ -1030,7 +1031,7 @@ jobs:
10301031
- name: "Upload wheels"
10311032
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
10321033
with:
1033-
name: wheels_uv-${{ matrix.platform.target }}
1034+
name: build-wheels-uv-${{ matrix.platform.target }}
10341035
path: dist
10351036
- name: "Archive binary"
10361037
shell: bash
@@ -1048,7 +1049,7 @@ jobs:
10481049
- name: "Upload binary"
10491050
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
10501051
with:
1051-
name: artifacts-${{ matrix.platform.target }}
1052+
name: build-github-archives-${{ matrix.platform.target }}
10521053
path: |
10531054
*.tar.gz
10541055
*.sha256
@@ -1084,7 +1085,7 @@ jobs:
10841085
- name: "Upload wheels uv-build"
10851086
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
10861087
with:
1087-
name: wheels_uv_build-${{ matrix.platform.target }}
1088+
name: build-wheels-uv_build-${{ matrix.platform.target }}
10881089
path: crates/uv-build/dist
10891090

10901091
musllinux:
@@ -1140,7 +1141,7 @@ jobs:
11401141
- name: "Upload wheels"
11411142
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
11421143
with:
1143-
name: wheels_uv-${{ matrix.target }}
1144+
name: build-wheels-uv-${{ matrix.target }}
11441145
path: dist
11451146
- name: "Archive binary"
11461147
shell: bash
@@ -1158,7 +1159,7 @@ jobs:
11581159
- name: "Upload binary"
11591160
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
11601161
with:
1161-
name: artifacts-${{ matrix.target }}
1162+
name: build-github-archives-${{ matrix.target }}
11621163
path: |
11631164
*.tar.gz
11641165
*.sha256
@@ -1194,7 +1195,7 @@ jobs:
11941195
- name: "Upload wheels uv-build"
11951196
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
11961197
with:
1197-
name: wheels_uv_build-${{ matrix.target }}
1198+
name: build-wheels-uv_build-${{ matrix.target }}
11981199
path: crates/uv-build/dist
11991200

12001201
musllinux-cross:
@@ -1281,7 +1282,7 @@ jobs:
12811282
- name: "Upload wheels"
12821283
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
12831284
with:
1284-
name: wheels_uv-${{ matrix.platform.target }}
1285+
name: build-wheels-uv-${{ matrix.platform.target }}
12851286
path: dist
12861287
- name: "Archive binary"
12871288
shell: bash
@@ -1300,7 +1301,7 @@ jobs:
13001301
- name: "Upload binary"
13011302
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
13021303
with:
1303-
name: artifacts-${{ matrix.platform.target }}
1304+
name: build-github-archives-${{ matrix.platform.target }}
13041305
path: |
13051306
*.tar.gz
13061307
*.sha256
@@ -1351,7 +1352,7 @@ jobs:
13511352
- name: "Upload wheels"
13521353
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
13531354
with:
1354-
name: wheels_uv_build-${{ matrix.platform.target }}
1355+
name: build-wheels-uv_build-${{ matrix.platform.target }}
13551356
path: crates/uv-build/dist
13561357

13571358
check-wheels:
@@ -1376,9 +1377,10 @@ jobs:
13761377
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
13771378
with:
13781379
enable-cache: false
1379-
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
1380+
- name: "Download built wheels"
1381+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
13801382
with:
1381-
pattern: wheels_*-*
1383+
pattern: build-wheels-*-*
13821384
path: wheels
13831385
merge-multiple: true
13841386
- name: "check wheel contents"

‎.github/workflows/plan.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ jobs:
144144
[[ "$file" == scripts/extract-wheel-binaries.py* || "$file" == scripts/sign-release-macos.py* || "$file" == scripts/verify-release-*.py* || "$file" == scripts/verify-release-*.ps1 || "$file" == scripts/test-release-wheels-* ]] && release_build_changed=1
145145
[[ "$file" == scripts/extract-github-release-binaries.py* || "$file" == scripts/inject-signed-github-release-binaries.py* || "$file" == scripts/verify-github-release-* ]] && release_build_changed=1
146146
[[ "$file" == "dist-workspace.toml" || "$file" == scripts/plan-release-signing.py* ]] && release_build_changed=1
147+
[[ "$file" == scripts/assemble-release-artifacts.py* || "$file" == "scripts/dist-manifest-to-files.sh" ]] && release_build_changed=1
147148
[[ "$file" == ".github/workflows/ci.yml" ]] && ci_workflow_changed=1
148149
[[ "$file" == "uv.schema.json" ]] && schema_changed=1
149150
[[ "$file" =~ ^crates/uv-publish/ || "$file" =~ ^scripts/publish/ || "$file" == "crates/uv/src/commands/publish.rs" ]] && publish_code_changed=1

‎.github/workflows/publish-mirror.yml‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ on:
99
plan:
1010
required: true
1111
type: string
12-
github-archives:
13-
description: "Artifact ID for the verified signed GitHub release archives"
12+
github-artifacts:
13+
description: "Artifact IDs for the complete GitHub release assets and manifest"
1414
required: true
1515
type: string
1616

@@ -31,13 +31,7 @@ jobs:
3131
- name: "Download GitHub Artifacts"
3232
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
3333
with:
34-
pattern: "artifacts-!(*-apple-darwin|*-pc-windows-msvc)"
35-
path: artifacts
36-
merge-multiple: true
37-
- name: "Download signed GitHub release archives"
38-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
39-
with:
40-
artifact-ids: ${{ inputs.github-archives }}
34+
artifact-ids: ${{ inputs.github-artifacts }}
4135
path: artifacts
4236
merge-multiple: true
4337
- name: "Upload to R2"

0 commit comments

Comments
 (0)