Skip to content

Commit

Permalink
Generate GHA attestations during release
Browse files Browse the repository at this point in the history
Signed-off-by: Facundo Tuesca <[email protected]>
  • Loading branch information
facutuesca committed Nov 20, 2024
1 parent f98fe60 commit 33f7377
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion {{cookiecutter.project_slug}}/.github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,31 @@ jobs:
name: distributions
path: dist/

generate-provenance:
name: Generate SLSA provenance for distributions
runs-on: ubuntu-latest
needs: [build]
permissions:
id-token: write # To sign the provenance.
attestations: write # To persist the attestation files.
steps:
- name: Download distributions
uses: actions/download-artifact@v4
with:
name: distributions
path: dist/
- name: Generate build provenance
uses: actions/attest-build-provenance@v1
with:
subject-path: 'dist/*'

publish:
name: Publish Python distributions to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/{{cookiecutter.project_slug}}
needs: [build]
needs: [build, generate-provenance]
permissions:
# Used to sign the release's artifacts with sigstore-python.
# Used to publish to PyPI with Trusted Publishing.
Expand Down

0 comments on commit 33f7377

Please sign in to comment.