File tree 3 files changed +35
-5
lines changed
3 files changed +35
-5
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ jobs:
130
130
pythonbuild_changed : ${{ steps.changed.outputs.pythonbuild_any_changed }}
131
131
steps :
132
132
- uses : actions/checkout@v4
133
-
133
+
134
134
- name : Set up Python
135
135
uses : astral-sh/setup-uv@v4
136
136
@@ -140,7 +140,7 @@ jobs:
140
140
# Convert GitHub labels array to comma-separated string
141
141
LABELS=$(echo '${{ toJson(github.event.pull_request.labels.*.name) }}' | jq -r 'join(",")')
142
142
echo "labels=$LABELS" >> $GITHUB_OUTPUT
143
-
143
+
144
144
- name : Generate build matrix
145
145
id : set-matrix
146
146
run : |
@@ -168,6 +168,10 @@ jobs:
168
168
- generate-matrix
169
169
- pythonbuild
170
170
- image
171
+ # Permissions used for actions/attest-build-provenance
172
+ permissions :
173
+ id-token : write
174
+ attestations : write
171
175
runs-on : ${{ matrix.runner }}
172
176
strategy :
173
177
matrix : ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
@@ -230,6 +234,12 @@ jobs:
230
234
231
235
build/pythonbuild validate-distribution ${EXTRA_ARGS} dist/*.tar.zst
232
236
237
+ - name : Generate attestations
238
+ uses : actions/attest-build-provenance@v2
239
+ if : ${{ github.ref == 'refs/heads/main' }}
240
+ with :
241
+ subject-path : dist/*
242
+
233
243
- name : Upload Distribution
234
244
if : ${{ ! matrix.dry-run }}
235
245
uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change @@ -87,10 +87,14 @@ jobs:
87
87
needs :
88
88
- generate-matrix
89
89
- pythonbuild
90
+ # Permissions used for actions/attest-build-provenance
91
+ permissions :
92
+ id-token : write
93
+ attestations : write
94
+ runs-on : ${{ matrix.runner }}
90
95
strategy :
91
96
matrix : ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
92
97
fail-fast : false
93
- runs-on : ${{ matrix.runner }}
94
98
name : ${{ matrix.target_triple }} / ${{ matrix.python }} / ${{ matrix.build_options }}
95
99
steps :
96
100
- uses : actions/checkout@v4
@@ -122,6 +126,12 @@ jobs:
122
126
123
127
./build-macos.py --target-triple ${{ matrix.target_triple }} --python cpython-${{ matrix.python }} --options ${{ matrix.build_options }}
124
128
129
+ - name : Generate attestations
130
+ uses : actions/attest-build-provenance@v2
131
+ if : ${{ github.ref == 'refs/heads/main' }}
132
+ with :
133
+ subject-path : dist/*
134
+
125
135
- name : Upload Distributions
126
136
if : ${{ ! matrix.dry-run }}
127
137
uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change 51
51
pythonbuild_changed : ${{ steps.changed.outputs.pythonbuild_any_changed }}
52
52
steps :
53
53
- uses : actions/checkout@v4
54
-
54
+
55
55
- name : Set up Python
56
56
uses : astral-sh/setup-uv@v4
57
57
61
61
# Convert GitHub labels array to comma-separated string
62
62
LABELS=$(echo '${{ toJson(github.event.pull_request.labels.*.name) }}' | jq -r 'join(",")')
63
63
echo "labels=$LABELS" >> $GITHUB_OUTPUT
64
-
64
+
65
65
- name : Generate build matrix
66
66
id : set-matrix
67
67
run : |
88
88
needs :
89
89
- generate-matrix
90
90
- pythonbuild
91
+ # Permissions used for actions/attest-build-provenance
92
+ permissions :
93
+ id-token : write
94
+ attestations : write
91
95
runs-on : ${{ matrix.runner }}
92
96
strategy :
93
97
matrix : ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
@@ -132,6 +136,12 @@ jobs:
132
136
$Dists = Resolve-Path -Path "dist/*.tar.zst" -Relative
133
137
.\pythonbuild.exe validate-distribution --run $Dists
134
138
139
+ - name : Generate attestations
140
+ uses : actions/attest-build-provenance@v2
141
+ if : ${{ github.ref == 'refs/heads/main' }}
142
+ with :
143
+ subject-path : dist/*
144
+
135
145
- name : Upload Distributions
136
146
uses : actions/upload-artifact@v4
137
147
with :
You can’t perform that action at this time.
0 commit comments