Skip to content

Commit ebe8df6

Browse files
feat: add SLSA provenance attestations to publish workflow
- Add attestations: write permission to publish-and-sign job - Add actions/attest step for wheel and sdist artifacts - Explicitly enable PEP 740 attestations in pypa/gh-action-pypi-publish Fixes #2235 Signed-off-by: bhuvan-somisetty <somisettybhuvan5@gmail.com>
1 parent 79b34a7 commit ebe8df6

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ jobs:
5959
permissions:
6060
contents: write
6161
id-token: write
62+
attestations: write
6263

6364
steps:
6465
- name: Harden the runner (Audit all outbound calls)
@@ -77,6 +78,13 @@ jobs:
7778
name: dist
7879
path: dist
7980

81+
- name: Generate build provenance attestations
82+
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
83+
with:
84+
subject-path: |
85+
dist/*.whl
86+
dist/*.tar.gz
87+
8088
- name: Sign release distributions with Sigstore
8189
uses: sigstore/gh-action-sigstore-python@04cffa1d795717b140764e8b640de88853c92acc # v3.3.0
8290
with:
@@ -98,6 +106,7 @@ jobs:
98106
with:
99107
packages-dir: publish-dist
100108
skip-existing: true
109+
attestations: true
101110

102111
- name: Upload signed assets to GitHub Release
103112
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0

0 commit comments

Comments
 (0)