Skip to content

Commit 15f6357

Browse files
committed
tmp: test attestations
1 parent 5fccb29 commit 15f6357

File tree

3 files changed

+11
-225
lines changed

3 files changed

+11
-225
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
release:
3030
env:
3131
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32-
runs-on: ubuntu-latest-large
32+
runs-on: ubuntu-latest
3333
steps:
3434
- uses: actions/checkout@v4
3535
with:
@@ -53,28 +53,17 @@ jobs:
5353
if: ${{ github.event.inputs.dry-run == 'false' }}
5454
run: git fetch origin ${{ github.event.inputs.sha }}
5555

56-
# Associate the commit with the tag.
57-
- name: Create tag
56+
# Uploading the relevant artifact to the GitHub release.
57+
- run: just release-run ${{ secrets.GITHUB_TOKEN }} ${{ github.event.inputs.sha }} ${{ github.event.inputs.tag }}
5858
if: ${{ github.event.inputs.dry-run == 'false' }}
59-
run: git tag ${{ github.event.inputs.tag }} ${{ github.event.inputs.sha }}
6059

61-
# Push the tag to GitHub.
62-
- name: Push tag
60+
- run: ls -la dist/*
6361
if: ${{ github.event.inputs.dry-run == 'false' }}
64-
run: git push origin ${{ github.event.inputs.tag }}
6562

66-
# Create a GitHub release.
67-
- name: Create GitHub Release
63+
- name: Generate attestations
64+
uses: actions/attest-build-provenance@v2
6865
if: ${{ github.event.inputs.dry-run == 'false' }}
69-
uses: ncipollo/release-action@v1
7066
with:
71-
tag: ${{ github.event.inputs.tag }}
72-
name: ${{ github.event.inputs.tag }}
73-
prerelease: true
74-
body: TBD
75-
allowUpdates: true
76-
updateOnlyUnreleased: true
77-
78-
# Uploading the relevant artifact to the GitHub release.
79-
- run: just release-run ${{ secrets.GITHUB_TOKEN }} ${{ github.event.inputs.sha }} ${{ github.event.inputs.tag }}
80-
if: ${{ github.event.inputs.dry-run == 'false' }}
67+
subject-path: |
68+
dist/*.tar.gz
69+
dist/*.tar.zst

Justfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ release-download-distributions token commit:
3232

3333
# Upload release artifacts to a GitHub release.
3434
release-upload-distributions token datetime tag:
35-
cargo run --release -- upload-release-distributions --token {{token}} --datetime {{datetime}} --tag {{tag}} --dist dist
35+
cargo run --release -- upload-release-distributions --token {{token}} --datetime {{datetime}} --tag {{tag}} --org samypr100 --ignore-missing --dist dist
3636

3737
# "Upload" release artifacts to a GitHub release in dry-run mode (skip upload).
3838
release-upload-distributions-dry-run token datetime tag:
39-
cargo run --release -- upload-release-distributions --token {{token}} --datetime {{datetime}} --tag {{tag}} --dist dist -n
39+
cargo run --release -- upload-release-distributions --token {{token}} --datetime {{datetime}} --tag {{tag}} --org samypr100 --ignore-missing --dist dist -n
4040

4141
# Promote a tag to "latest" by pushing to the `latest-release` branch.
4242
release-set-latest-release tag:
@@ -76,7 +76,6 @@ release-run token commit tag:
7676
just release-download-distributions {{token}} {{commit}}
7777
datetime=$(ls dist/cpython-3.10.*-x86_64-unknown-linux-gnu-install_only-*.tar.gz | awk -F- '{print $8}' | awk -F. '{print $1}')
7878
just release-upload-distributions {{token}} ${datetime} {{tag}}
79-
just release-set-latest-release {{tag}}
8079

8180
# Perform a release in dry-run mode.
8281
release-dry-run token commit tag:

src/release.rs

Lines changed: 0 additions & 202 deletions
Original file line numberDiff line numberDiff line change
@@ -91,32 +91,8 @@ pub static RELEASE_TRIPLES: Lazy<BTreeMap<&'static str, TripleRelease>> = Lazy::
9191
}],
9292
},
9393
);
94-
h.insert(
95-
"x86_64-apple-darwin",
96-
TripleRelease {
97-
suffixes: macos_suffixes,
98-
install_only_suffix: "pgo+lto",
99-
python_version_requirement: None,
100-
conditional_suffixes: vec![ConditionalSuffixes {
101-
python_version_requirement: VersionSpecifier::from_str(">=3.13.0rc0").unwrap(),
102-
suffixes: macos_suffixes_313.clone(),
103-
}],
104-
},
105-
);
10694

10795
// Windows.
108-
h.insert(
109-
"i686-pc-windows-msvc",
110-
TripleRelease {
111-
suffixes: vec!["pgo"],
112-
install_only_suffix: "pgo",
113-
python_version_requirement: None,
114-
conditional_suffixes: vec![ConditionalSuffixes {
115-
python_version_requirement: VersionSpecifier::from_str(">=3.13").unwrap(),
116-
suffixes: vec!["freethreaded+pgo"],
117-
}],
118-
},
119-
);
12096
h.insert(
12197
"x86_64-pc-windows-msvc",
12298
TripleRelease {
@@ -130,33 +106,6 @@ pub static RELEASE_TRIPLES: Lazy<BTreeMap<&'static str, TripleRelease>> = Lazy::
130106
},
131107
);
132108

133-
// The 'shared-' prefix is no longer needed, but we're double-publishing under both names during
134-
// the transition period.
135-
h.insert(
136-
"i686-pc-windows-msvc-shared",
137-
TripleRelease {
138-
suffixes: vec!["pgo"],
139-
install_only_suffix: "pgo",
140-
python_version_requirement: None,
141-
conditional_suffixes: vec![ConditionalSuffixes {
142-
python_version_requirement: VersionSpecifier::from_str(">=3.13").unwrap(),
143-
suffixes: vec!["freethreaded+pgo"],
144-
}],
145-
},
146-
);
147-
h.insert(
148-
"x86_64-pc-windows-msvc-shared",
149-
TripleRelease {
150-
suffixes: vec!["pgo"],
151-
install_only_suffix: "pgo",
152-
python_version_requirement: None,
153-
conditional_suffixes: vec![ConditionalSuffixes {
154-
python_version_requirement: VersionSpecifier::from_str(">=3.13").unwrap(),
155-
suffixes: vec!["freethreaded+pgo"],
156-
}],
157-
},
158-
);
159-
160109
// Linux.
161110
let linux_suffixes_pgo = vec!["debug", "pgo+lto"];
162111
let linux_suffixes_nopgo = vec!["debug", "lto", "noopt"];
@@ -167,84 +116,6 @@ pub static RELEASE_TRIPLES: Lazy<BTreeMap<&'static str, TripleRelease>> = Lazy::
167116
"freethreaded+noopt",
168117
];
169118

170-
h.insert(
171-
"aarch64-unknown-linux-gnu",
172-
TripleRelease {
173-
suffixes: linux_suffixes_nopgo.clone(),
174-
install_only_suffix: "lto",
175-
python_version_requirement: None,
176-
conditional_suffixes: vec![ConditionalSuffixes {
177-
python_version_requirement: VersionSpecifier::from_str(">=3.13").unwrap(),
178-
suffixes: linux_suffixes_nopgo_freethreaded.clone(),
179-
}],
180-
},
181-
);
182-
183-
h.insert(
184-
"ppc64le-unknown-linux-gnu",
185-
TripleRelease {
186-
suffixes: linux_suffixes_nopgo.clone(),
187-
install_only_suffix: "lto",
188-
python_version_requirement: Some(VersionSpecifier::from_str(">=3.9").unwrap()),
189-
conditional_suffixes: vec![ConditionalSuffixes {
190-
python_version_requirement: VersionSpecifier::from_str(">=3.13").unwrap(),
191-
suffixes: linux_suffixes_nopgo_freethreaded.clone(),
192-
}],
193-
},
194-
);
195-
196-
h.insert(
197-
"riscv64-unknown-linux-gnu",
198-
TripleRelease {
199-
suffixes: linux_suffixes_nopgo.clone(),
200-
install_only_suffix: "lto",
201-
python_version_requirement: Some(VersionSpecifier::from_str(">=3.9").unwrap()),
202-
conditional_suffixes: vec![ConditionalSuffixes {
203-
python_version_requirement: VersionSpecifier::from_str(">=3.13").unwrap(),
204-
suffixes: linux_suffixes_nopgo_freethreaded.clone(),
205-
}],
206-
},
207-
);
208-
209-
h.insert(
210-
"s390x-unknown-linux-gnu",
211-
TripleRelease {
212-
suffixes: linux_suffixes_nopgo.clone(),
213-
install_only_suffix: "lto",
214-
python_version_requirement: Some(VersionSpecifier::from_str(">=3.9").unwrap()),
215-
conditional_suffixes: vec![ConditionalSuffixes {
216-
python_version_requirement: VersionSpecifier::from_str(">=3.13").unwrap(),
217-
suffixes: linux_suffixes_nopgo_freethreaded.clone(),
218-
}],
219-
},
220-
);
221-
222-
h.insert(
223-
"armv7-unknown-linux-gnueabi",
224-
TripleRelease {
225-
suffixes: linux_suffixes_nopgo.clone(),
226-
install_only_suffix: "lto",
227-
python_version_requirement: Some(VersionSpecifier::from_str(">=3.9").unwrap()),
228-
conditional_suffixes: vec![ConditionalSuffixes {
229-
python_version_requirement: VersionSpecifier::from_str(">=3.13").unwrap(),
230-
suffixes: linux_suffixes_nopgo_freethreaded.clone(),
231-
}],
232-
},
233-
);
234-
235-
h.insert(
236-
"armv7-unknown-linux-gnueabihf",
237-
TripleRelease {
238-
suffixes: linux_suffixes_nopgo.clone(),
239-
install_only_suffix: "lto",
240-
python_version_requirement: Some(VersionSpecifier::from_str(">=3.9").unwrap()),
241-
conditional_suffixes: vec![ConditionalSuffixes {
242-
python_version_requirement: VersionSpecifier::from_str(">=3.13").unwrap(),
243-
suffixes: linux_suffixes_nopgo_freethreaded.clone(),
244-
}],
245-
},
246-
);
247-
248119
h.insert(
249120
"x86_64-unknown-linux-gnu",
250121
TripleRelease {
@@ -257,79 +128,6 @@ pub static RELEASE_TRIPLES: Lazy<BTreeMap<&'static str, TripleRelease>> = Lazy::
257128
}],
258129
},
259130
);
260-
h.insert(
261-
"x86_64_v2-unknown-linux-gnu",
262-
TripleRelease {
263-
suffixes: linux_suffixes_pgo.clone(),
264-
install_only_suffix: "pgo+lto",
265-
python_version_requirement: Some(VersionSpecifier::from_str(">=3.9").unwrap()),
266-
conditional_suffixes: vec![ConditionalSuffixes {
267-
python_version_requirement: VersionSpecifier::from_str(">=3.13").unwrap(),
268-
suffixes: linux_suffixes_pgo_freethreaded.clone(),
269-
}],
270-
},
271-
);
272-
h.insert(
273-
"x86_64_v3-unknown-linux-gnu",
274-
TripleRelease {
275-
suffixes: linux_suffixes_pgo.clone(),
276-
install_only_suffix: "pgo+lto",
277-
python_version_requirement: Some(VersionSpecifier::from_str(">=3.9").unwrap()),
278-
conditional_suffixes: vec![ConditionalSuffixes {
279-
python_version_requirement: VersionSpecifier::from_str(">=3.13").unwrap(),
280-
suffixes: linux_suffixes_pgo_freethreaded.clone(),
281-
}],
282-
},
283-
);
284-
h.insert(
285-
"x86_64_v4-unknown-linux-gnu",
286-
TripleRelease {
287-
suffixes: linux_suffixes_pgo.clone(),
288-
install_only_suffix: "pgo+lto",
289-
python_version_requirement: Some(VersionSpecifier::from_str(">=3.9").unwrap()),
290-
conditional_suffixes: vec![ConditionalSuffixes {
291-
python_version_requirement: VersionSpecifier::from_str(">=3.13").unwrap(),
292-
suffixes: linux_suffixes_pgo_freethreaded.clone(),
293-
}],
294-
},
295-
);
296-
// TODO: Python 3.14 support on musl
297-
h.insert(
298-
"x86_64-unknown-linux-musl",
299-
TripleRelease {
300-
suffixes: linux_suffixes_nopgo.clone(),
301-
install_only_suffix: "lto",
302-
python_version_requirement: Some(VersionSpecifier::from_str("<3.14").unwrap()),
303-
conditional_suffixes: vec![],
304-
},
305-
);
306-
h.insert(
307-
"x86_64_v2-unknown-linux-musl",
308-
TripleRelease {
309-
suffixes: linux_suffixes_nopgo.clone(),
310-
install_only_suffix: "lto",
311-
python_version_requirement: Some(VersionSpecifier::from_str("<3.14").unwrap()),
312-
conditional_suffixes: vec![],
313-
},
314-
);
315-
h.insert(
316-
"x86_64_v3-unknown-linux-musl",
317-
TripleRelease {
318-
suffixes: linux_suffixes_nopgo.clone(),
319-
install_only_suffix: "lto",
320-
python_version_requirement: Some(VersionSpecifier::from_str("<3.14").unwrap()),
321-
conditional_suffixes: vec![],
322-
},
323-
);
324-
h.insert(
325-
"x86_64_v4-unknown-linux-musl",
326-
TripleRelease {
327-
suffixes: linux_suffixes_nopgo.clone(),
328-
install_only_suffix: "lto",
329-
python_version_requirement: Some(VersionSpecifier::from_str("<3.14").unwrap()),
330-
conditional_suffixes: vec![],
331-
},
332-
);
333131

334132
h
335133
});

0 commit comments

Comments
 (0)