Skip to content

Commit 8bca5b8

Browse files
feat: add SLSA provenance attestations to publish workflow (#2238)
Signed-off-by: bhuvan-somisetty <somisettybhuvan5@gmail.com>
1 parent d0b8d18 commit 8bca5b8

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ jobs:
1212
build:
1313
name: Build distributions
1414
runs-on: hl-sdk-py-lin-md
15+
permissions:
16+
contents: read
17+
id-token: write
18+
attestations: write
19+
artifact-metadata: write
1520

1621
steps:
1722
- name: Harden the runner (Audit all outbound calls)
@@ -39,6 +44,13 @@ jobs:
3944
- name: Build wheel and sdist
4045
run: python -m build
4146

47+
- name: Generate build provenance attestations
48+
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
49+
with:
50+
subject-path: |
51+
dist/*.whl
52+
dist/*.tar.gz
53+
4254
- name: Upload distributions
4355
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
4456
with:
@@ -98,6 +110,7 @@ jobs:
98110
with:
99111
packages-dir: publish-dist
100112
skip-existing: true
113+
attestations: true
101114

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

0 commit comments

Comments
 (0)