Skip to content

Commit

Permalink
Build attestations improvements (#501)
Browse files Browse the repository at this point in the history
Per
#343 (comment)

* Adds attestations to build-0 of the linux matrix (due to recent
refactor)
* Adds attestations to release artifacts which include install only
derived builds.
  • Loading branch information
samypr100 authored Jan 28, 2025
1 parent 8dc1b9c commit cb32f8d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,12 @@ jobs:
build/pythonbuild validate-distribution ${EXTRA_ARGS} dist/*.tar.zst
- name: Generate attestations
uses: actions/attest-build-provenance@v2
if: ${{ github.ref == 'refs/heads/main' }}
with:
subject-path: dist/*

- name: Upload Distribution
if: ${{ ! matrix.dry-run }}
uses: actions/upload-artifact@v4
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ env:
permissions:
contents: write
packages: write
# Permissions used for actions/attest-build-provenance
id-token: write
attestations: write

jobs:
release:
Expand Down Expand Up @@ -75,3 +78,9 @@ jobs:
# Uploading the relevant artifact to the GitHub release.
- run: just release-run ${{ secrets.GITHUB_TOKEN }} ${{ github.event.inputs.sha }} ${{ github.event.inputs.tag }}
if: ${{ github.event.inputs.dry-run == 'false' }}

- name: Generate attestations
uses: actions/attest-build-provenance@v2
if: ${{ github.event.inputs.dry-run == 'false' }}
with:
subject-path: dist/*.tar.@(zst|gz)

0 comments on commit cb32f8d

Please sign in to comment.