15
15
name : Build wheels (Linux-ARM64)
16
16
needs :
17
17
- release_info
18
+ permissions :
19
+ attestations : write
20
+ contents : read
21
+ id-token : write
18
22
runs-on :
19
23
- self-hosted
20
24
- runs-on
@@ -73,17 +77,34 @@ jobs:
73
77
name : logs-wheels-and-pex-Linux-ARM64
74
78
overwrite : ' true'
75
79
path : .pants.d/workdir/*.log
80
+ - if : needs.release_info.outputs.is-release == 'true'
81
+ name : Attest the pantsbuild.pants wheel
82
+ uses : actions/attest-build-provenance@v2
83
+ with :
84
+ subject-path : dist/deploy/wheels/pantsbuild.pants/**/pantsbuild.pants-*.whl
85
+ - if : needs.release_info.outputs.is-release == 'true'
86
+ name : Rename the Pants Pex to its final name for upload
87
+ run : ' PEX_FILENAME=pants.$PANTS_VER-$PY_VER-$PLAT.pex
88
+
89
+ mv dist/src.python.pants/pants-pex.pex dist/src.python.pants/$PEX_FILENAME
90
+
91
+ '
92
+ - continue-on-error : true
93
+ if : needs.release_info.outputs.is-release == 'true'
94
+ name : Attest the Pants Pex artifact
95
+ uses : actions/attest-build-provenance@v2
96
+ with :
97
+ subject-path : dist/src.python.pants/*.pex
76
98
- if : needs.release_info.outputs.is-release == 'true'
77
99
name : Upload Wheel and Pex
78
100
run : " PANTS_VER=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c \" \
79
101
import pants.version;print(pants.version.VERSION)\" )\n PY_VER=$(PEX_INTERPRETER=1\
80
102
\ dist/src.python.pants/pants-pex.pex -c \" import sys;print(f'cp{sys.version_info[0]}{sys.version_info[1]}')\" \
81
103
)\n PLAT=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c \" import\
82
104
\ os;print(f'{os.uname().sysname.lower()}_{os.uname().machine.lower()}')\" \
83
- )\n PEX_FILENAME=pants.$PANTS_VER-$PY_VER-$PLAT.pex\n\n mv dist/src.python.pants/pants-pex.pex\
84
- \ dist/src.python.pants/$PEX_FILENAME\n\n curl -L --fail \\\n -X POST \\ \
85
- \n -H \" Authorization: Bearer ${{ github.token }}\" \\\n -H \" Content-Type:\
86
- \ application/octet-stream\" \\\n ${{ needs.release_info.outputs.release-asset-upload-url\
105
+ )\n PEX_FILENAME=pants.$PANTS_VER-$PY_VER-$PLAT.pex\n\n curl -L --fail \\\n \
106
+ \ -X POST \\\n -H \" Authorization: Bearer ${{ github.token }}\" \\\n \
107
+ \ -H \" Content-Type: application/octet-stream\" \\\n ${{ needs.release_info.outputs.release-asset-upload-url\
87
108
\ }}?name=$PEX_FILENAME \\\n --data-binary \" @dist/src.python.pants/$PEX_FILENAME\" \
88
109
\n\n WHL=$(find dist/deploy/wheels/pantsbuild.pants -type f -name \" pantsbuild.pants-*.whl\" \
89
110
)\n curl -L --fail \\\n -X POST \\\n -H \" Authorization: Bearer ${{ github.token\
@@ -102,6 +123,10 @@ jobs:
102
123
name : Build wheels (Linux-x86_64)
103
124
needs :
104
125
- release_info
126
+ permissions :
127
+ attestations : write
128
+ contents : read
129
+ id-token : write
105
130
runs-on :
106
131
- ubuntu-22.04
107
132
steps :
@@ -160,23 +185,46 @@ jobs:
160
185
name : logs-wheels-and-pex-Linux-x86_64
161
186
overwrite : ' true'
162
187
path : .pants.d/workdir/*.log
188
+ - if : needs.release_info.outputs.is-release == 'true'
189
+ name : Attest the pantsbuild.pants wheel
190
+ uses : actions/attest-build-provenance@v2
191
+ with :
192
+ subject-path : dist/deploy/wheels/pantsbuild.pants/**/pantsbuild.pants-*.whl
193
+ - if : needs.release_info.outputs.is-release == 'true'
194
+ name : Rename the Pants Pex to its final name for upload
195
+ run : ' PEX_FILENAME=pants.$PANTS_VER-$PY_VER-$PLAT.pex
196
+
197
+ mv dist/src.python.pants/pants-pex.pex dist/src.python.pants/$PEX_FILENAME
198
+
199
+ '
200
+ - continue-on-error : true
201
+ if : needs.release_info.outputs.is-release == 'true'
202
+ name : Attest the Pants Pex artifact
203
+ uses : actions/attest-build-provenance@v2
204
+ with :
205
+ subject-path : dist/src.python.pants/*.pex
163
206
- if : needs.release_info.outputs.is-release == 'true'
164
207
name : Upload Wheel and Pex
165
208
run : " PANTS_VER=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c \" \
166
209
import pants.version;print(pants.version.VERSION)\" )\n PY_VER=$(PEX_INTERPRETER=1\
167
210
\ dist/src.python.pants/pants-pex.pex -c \" import sys;print(f'cp{sys.version_info[0]}{sys.version_info[1]}')\" \
168
211
)\n PLAT=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c \" import\
169
212
\ os;print(f'{os.uname().sysname.lower()}_{os.uname().machine.lower()}')\" \
170
- )\n PEX_FILENAME=pants.$PANTS_VER-$PY_VER-$PLAT.pex\n\n mv dist/src.python.pants/pants-pex.pex\
171
- \ dist/src.python.pants/$PEX_FILENAME\n\n curl -L --fail \\\n -X POST \\ \
172
- \n -H \" Authorization: Bearer ${{ github.token }}\" \\\n -H \" Content-Type:\
173
- \ application/octet-stream\" \\\n ${{ needs.release_info.outputs.release-asset-upload-url\
213
+ )\n PEX_FILENAME=pants.$PANTS_VER-$PY_VER-$PLAT.pex\n\n curl -L --fail \\\n \
214
+ \ -X POST \\\n -H \" Authorization: Bearer ${{ github.token }}\" \\\n \
215
+ \ -H \" Content-Type: application/octet-stream\" \\\n ${{ needs.release_info.outputs.release-asset-upload-url\
174
216
\ }}?name=$PEX_FILENAME \\\n --data-binary \" @dist/src.python.pants/$PEX_FILENAME\" \
175
217
\n\n WHL=$(find dist/deploy/wheels/pantsbuild.pants -type f -name \" pantsbuild.pants-*.whl\" \
176
218
)\n curl -L --fail \\\n -X POST \\\n -H \" Authorization: Bearer ${{ github.token\
177
219
\ }}\" \\\n -H \" Content-Type: application/octet-stream\" \\\n \" ${{\
178
220
\ needs.release_info.outputs.release-asset-upload-url }}?name=$(basename $WHL)\" \
179
221
\ \\\n --data-binary \" @$WHL\" ;\n "
222
+ - continue-on-error : true
223
+ if : needs.release_info.outputs.is-release == 'true'
224
+ name : Attest the pantsbuild.pants.testutil wheel
225
+ uses : actions/attest-build-provenance@v2
226
+ with :
227
+ subject-path : dist/deploy/wheels/pantsbuild.pants/**/pantsbuild.pants.testutil*.whl
180
228
- if : needs.release_info.outputs.is-release == 'true'
181
229
name : Upload testutil Wheel
182
230
run : " WHL=$(find dist/deploy/wheels/pantsbuild.pants -type f -name \" pantsbuild.pants.testutil*.whl\" \
@@ -194,6 +242,10 @@ jobs:
194
242
name : Build wheels (macOS13-x86_64)
195
243
needs :
196
244
- release_info
245
+ permissions :
246
+ attestations : write
247
+ contents : read
248
+ id-token : write
197
249
runs-on :
198
250
- macos-13
199
251
steps :
@@ -270,17 +322,34 @@ jobs:
270
322
name : logs-wheels-and-pex-macOS13-x86_64
271
323
overwrite : ' true'
272
324
path : .pants.d/workdir/*.log
325
+ - if : needs.release_info.outputs.is-release == 'true'
326
+ name : Attest the pantsbuild.pants wheel
327
+ uses : actions/attest-build-provenance@v2
328
+ with :
329
+ subject-path : dist/deploy/wheels/pantsbuild.pants/**/pantsbuild.pants-*.whl
330
+ - if : needs.release_info.outputs.is-release == 'true'
331
+ name : Rename the Pants Pex to its final name for upload
332
+ run : ' PEX_FILENAME=pants.$PANTS_VER-$PY_VER-$PLAT.pex
333
+
334
+ mv dist/src.python.pants/pants-pex.pex dist/src.python.pants/$PEX_FILENAME
335
+
336
+ '
337
+ - continue-on-error : true
338
+ if : needs.release_info.outputs.is-release == 'true'
339
+ name : Attest the Pants Pex artifact
340
+ uses : actions/attest-build-provenance@v2
341
+ with :
342
+ subject-path : dist/src.python.pants/*.pex
273
343
- if : needs.release_info.outputs.is-release == 'true'
274
344
name : Upload Wheel and Pex
275
345
run : " PANTS_VER=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c \" \
276
346
import pants.version;print(pants.version.VERSION)\" )\n PY_VER=$(PEX_INTERPRETER=1\
277
347
\ dist/src.python.pants/pants-pex.pex -c \" import sys;print(f'cp{sys.version_info[0]}{sys.version_info[1]}')\" \
278
348
)\n PLAT=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c \" import\
279
349
\ os;print(f'{os.uname().sysname.lower()}_{os.uname().machine.lower()}')\" \
280
- )\n PEX_FILENAME=pants.$PANTS_VER-$PY_VER-$PLAT.pex\n\n mv dist/src.python.pants/pants-pex.pex\
281
- \ dist/src.python.pants/$PEX_FILENAME\n\n curl -L --fail \\\n -X POST \\ \
282
- \n -H \" Authorization: Bearer ${{ github.token }}\" \\\n -H \" Content-Type:\
283
- \ application/octet-stream\" \\\n ${{ needs.release_info.outputs.release-asset-upload-url\
350
+ )\n PEX_FILENAME=pants.$PANTS_VER-$PY_VER-$PLAT.pex\n\n curl -L --fail \\\n \
351
+ \ -X POST \\\n -H \" Authorization: Bearer ${{ github.token }}\" \\\n \
352
+ \ -H \" Content-Type: application/octet-stream\" \\\n ${{ needs.release_info.outputs.release-asset-upload-url\
284
353
\ }}?name=$PEX_FILENAME \\\n --data-binary \" @dist/src.python.pants/$PEX_FILENAME\" \
285
354
\n\n WHL=$(find dist/deploy/wheels/pantsbuild.pants -type f -name \" pantsbuild.pants-*.whl\" \
286
355
)\n curl -L --fail \\\n -X POST \\\n -H \" Authorization: Bearer ${{ github.token\
@@ -297,6 +366,10 @@ jobs:
297
366
name : Build wheels (macOS14-ARM64)
298
367
needs :
299
368
- release_info
369
+ permissions :
370
+ attestations : write
371
+ contents : read
372
+ id-token : write
300
373
runs-on :
301
374
- macos-14
302
375
steps :
@@ -369,17 +442,34 @@ jobs:
369
442
name : logs-wheels-and-pex-macOS14-ARM64
370
443
overwrite : ' true'
371
444
path : .pants.d/workdir/*.log
445
+ - if : needs.release_info.outputs.is-release == 'true'
446
+ name : Attest the pantsbuild.pants wheel
447
+ uses : actions/attest-build-provenance@v2
448
+ with :
449
+ subject-path : dist/deploy/wheels/pantsbuild.pants/**/pantsbuild.pants-*.whl
450
+ - if : needs.release_info.outputs.is-release == 'true'
451
+ name : Rename the Pants Pex to its final name for upload
452
+ run : ' PEX_FILENAME=pants.$PANTS_VER-$PY_VER-$PLAT.pex
453
+
454
+ mv dist/src.python.pants/pants-pex.pex dist/src.python.pants/$PEX_FILENAME
455
+
456
+ '
457
+ - continue-on-error : true
458
+ if : needs.release_info.outputs.is-release == 'true'
459
+ name : Attest the Pants Pex artifact
460
+ uses : actions/attest-build-provenance@v2
461
+ with :
462
+ subject-path : dist/src.python.pants/*.pex
372
463
- if : needs.release_info.outputs.is-release == 'true'
373
464
name : Upload Wheel and Pex
374
465
run : " PANTS_VER=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c \" \
375
466
import pants.version;print(pants.version.VERSION)\" )\n PY_VER=$(PEX_INTERPRETER=1\
376
467
\ dist/src.python.pants/pants-pex.pex -c \" import sys;print(f'cp{sys.version_info[0]}{sys.version_info[1]}')\" \
377
468
)\n PLAT=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c \" import\
378
469
\ os;print(f'{os.uname().sysname.lower()}_{os.uname().machine.lower()}')\" \
379
- )\n PEX_FILENAME=pants.$PANTS_VER-$PY_VER-$PLAT.pex\n\n mv dist/src.python.pants/pants-pex.pex\
380
- \ dist/src.python.pants/$PEX_FILENAME\n\n curl -L --fail \\\n -X POST \\ \
381
- \n -H \" Authorization: Bearer ${{ github.token }}\" \\\n -H \" Content-Type:\
382
- \ application/octet-stream\" \\\n ${{ needs.release_info.outputs.release-asset-upload-url\
470
+ )\n PEX_FILENAME=pants.$PANTS_VER-$PY_VER-$PLAT.pex\n\n curl -L --fail \\\n \
471
+ \ -X POST \\\n -H \" Authorization: Bearer ${{ github.token }}\" \\\n \
472
+ \ -H \" Content-Type: application/octet-stream\" \\\n ${{ needs.release_info.outputs.release-asset-upload-url\
383
473
\ }}?name=$PEX_FILENAME \\\n --data-binary \" @dist/src.python.pants/$PEX_FILENAME\" \
384
474
\n\n WHL=$(find dist/deploy/wheels/pantsbuild.pants -type f -name \" pantsbuild.pants-*.whl\" \
385
475
)\n curl -L --fail \\\n -X POST \\\n -H \" Authorization: Bearer ${{ github.token\
0 commit comments