Skip to content

Commit

Permalink
build(attestation): 👷 attest build provenance on release (#616)
Browse files Browse the repository at this point in the history
Closes #615
  • Loading branch information
XaF authored Jul 1, 2024
1 parent 87d2840 commit a55139e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
release_version:
description: The release version to use for the build
type: string
sign:
description: Whether to sign the artifact
type: boolean
default: true
outputs:
release_version:
description: The release version that was used for the build
Expand All @@ -26,6 +30,10 @@ on:
release_version:
description: The release version to use for the build
type: string
sign:
description: Whether to sign the artifact
type: boolean
default: true


concurrency:
Expand Down Expand Up @@ -68,3 +76,4 @@ jobs:
suffix: ${{ matrix.suffix }}
run_tests: ${{ matrix.run_tests }}
extra_test_containers: ${{ matrix.extra_test_containers }}
sign: ${{ inputs.sign }}
8 changes: 8 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ run-name: Releasing ${{ github.ref }}

permissions:
contents: write
id-token: write
attestations: write


on:
Expand Down Expand Up @@ -55,6 +57,7 @@ jobs:
with:
git_sha: ${{ github.sha }}
release_version: ${{ needs.prepare-release-version.outputs.release_version }}
sign: true


create-release:
Expand Down Expand Up @@ -112,6 +115,11 @@ jobs:
excludeTypes: build,docs,other,style,chore,test,tests,refactor
writeToFile: false

- name: Attest build provenance
uses: actions/attest-build-provenance@v1
with:
subject-path: '/tmp/binaries/**/*'

- name: Create release
uses: softprops/action-gh-release@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ jobs:
with:
git_sha: ${{ github.sha }}
release_version: ${{ needs.prepare-release-version.outputs.release_version }}
sign: false


rust-clippy-analysis:
Expand Down

0 comments on commit a55139e

Please sign in to comment.