Skip to content

Commit 639bf61

Browse files
committed
Add build attestations. Closes astral-sh#343
1 parent 78e57bd commit 639bf61

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

.github/workflows/apple.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,12 @@ jobs:
201201
runner: macos-13
202202
py: 'cpython-3.13'
203203
options: 'freethreaded+pgo+lto'
204+
205+
permissions:
206+
id-token: write
207+
contents: read
208+
attestations: write
209+
204210
needs:
205211
- pythonbuild
206212
runs-on: ${{ matrix.build.runner }}
@@ -233,6 +239,11 @@ jobs:
233239
234240
./build-macos.py --target-triple ${{ matrix.build.target_triple }} --python ${{ matrix.build.py }} --options ${{ matrix.build.options }}
235241
242+
- name: Generate artifact attestation
243+
uses: actions/attest-build-provenance@v1
244+
with:
245+
subject-path: dist/*
246+
236247
- name: Upload Distributions
237248
uses: actions/upload-artifact@v4
238249
with:

.github/workflows/linux.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,11 @@ jobs:
803803
py: 'cpython-3.12'
804804
options: 'lto'
805805

806+
permissions:
807+
id-token: write
808+
contents: read
809+
attestations: write
810+
806811
needs:
807812
- pythonbuild
808813
- image
@@ -861,6 +866,11 @@ jobs:
861866
fi
862867
863868
build/pythonbuild validate-distribution ${EXTRA_ARGS} dist/*.tar.zst
869+
870+
- name: Generate artifact attestation
871+
uses: actions/attest-build-provenance@v1
872+
with:
873+
subject-path: dist/*
864874

865875
- name: Upload Distribution
866876
uses: actions/upload-artifact@v4

.github/workflows/windows.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ jobs:
6363
vcvars: 'vcvars64.bat'
6464
options: 'freethreaded+pgo'
6565

66+
permissions:
67+
id-token: write
68+
contents: read
69+
attestations: write
70+
6671
needs: pythonbuild
6772
runs-on: 'windows-2019'
6873
steps:
@@ -101,6 +106,11 @@ jobs:
101106
run: |
102107
$Dists = Resolve-Path -Path "dist/*.tar.zst" -Relative
103108
.\pythonbuild.exe validate-distribution --run $Dists
109+
110+
- name: Generate artifact attestation
111+
uses: actions/attest-build-provenance@v1
112+
with:
113+
subject-path: dist/*
104114

105115
- name: Upload Distributions
106116
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)