Skip to content

Commit 820a6a0

Browse files
committed
Add attestation.
1 parent 5353485 commit 820a6a0

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ jobs:
3636
needs: pre-commit
3737
name: Build wheels
3838
runs-on: macos-latest
39+
permissions:
40+
# Required by attest-build-provenance to mint a Sigstore signing
41+
# certificate via OIDC; only granted to this job, not the workflow.
42+
id-token: write
43+
attestations: write
44+
contents: read
3945
steps:
4046
- uses: actions/checkout@v4
4147

@@ -48,6 +54,12 @@ jobs:
4854
with:
4955
output-dir: dist
5056

57+
- name: Generate build-provenance attestation for wheels
58+
if: inputs.attest-package == 'true'
59+
uses: actions/attest-build-provenance@v4
60+
with:
61+
subject-path: "dist/*.whl"
62+
5163
- uses: actions/upload-artifact@v4
5264
with:
5365
name: dist-wheels
@@ -58,6 +70,10 @@ jobs:
5870
needs: pre-commit
5971
name: Build sdist
6072
runs-on: macos-latest
73+
permissions:
74+
id-token: write
75+
attestations: write
76+
contents: read
6177
steps:
6278
- uses: actions/checkout@v4
6379

@@ -70,6 +86,12 @@ jobs:
7086
python -m pip install --upgrade build
7187
python -m build --sdist
7288
89+
- name: Generate build-provenance attestation for sdist
90+
if: inputs.attest-package == 'true'
91+
uses: actions/attest-build-provenance@v4
92+
with:
93+
subject-path: "dist/*.tar.gz"
94+
7395
- uses: actions/upload-artifact@v4
7496
with:
7597
name: dist-sdist

0 commit comments

Comments
 (0)