Skip to content

Commit

Permalink
Merge pull request #53 from v1v/feature/attestations
Browse files Browse the repository at this point in the history
feat: add attestation support
  • Loading branch information
andyfeller authored May 14, 2024
2 parents b0da21c + 2038cf2 commit 309b2c2
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,37 @@ jobs:
gpg_fingerprint: ${{ steps.import_gpg.outputs.fingerprint }}
```


## Support for Artifact Attestations

This action can optionally generate signed build provenance attestations for all published executables within `${{ github.workspace }}/dist/*`.

For more information, see ["Using artifact attestations to establish provenance for builds"](https://docs.github.com/en/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).

```yaml
name: release
on:
push:
tags:
- "v*"
permissions:
contents: write
id-token: write
attestations: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cli/gh-extension-precompile@v1
with:
generate_attestations: true
```


## Authors

- nate smith <https://github.com/vilmibm>
Expand Down
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ inputs:
description: "Tag that the release should be created from, defaults to `github.ref` if unspecified"
release_title_prefix:
description: "Title prefix of the release, defaults to repository name if unspecified"
generate_attestations:
description: "Whether to generate artifact attestations for release binaries to establish build provenance, defaults to `false` if unspecified"
default: false
branding:
color: purple
icon: box
Expand Down Expand Up @@ -84,3 +87,8 @@ runs:
GH_RELEASE_TITLE_PREFIX: ${{ steps.determine_release_title_prefix.outputs.PREFIX }}
DRAFT_RELEASE: ${{ inputs.draft_release }}
shell: bash

- if: ${{ inputs.generate_attestations == 'true' }}
uses: actions/attest-build-provenance@v1
with:
subject-path: '${{ github.workspace }}/dist/*'

0 comments on commit 309b2c2

Please sign in to comment.