Skip to content

Commit

Permalink
ci: add attestations (#631)
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii authored Sep 30, 2024
1 parent 9f4e144 commit 227604a
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,28 @@ jobs:
needs: [dist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
environment: pypi
environment:
name: pypi
url: https://pypi.org/p/particle
permissions:
id-token: write

attestations: write

steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
- name: Generate artifact attestation for sdist and wheel
uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3
with:
subject-path: "dist/particle*"

- name: Upload package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true

- uses: actions/download-artifact@v4
with:
Expand All @@ -75,3 +85,8 @@ jobs:
uses: softprops/action-gh-release@v2
with:
files: ./zipapp/particle.pyz

- name: Generate artifact attestation for zipapp
uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3
with:
subject-path: zipapp/particle.pyz

0 comments on commit 227604a

Please sign in to comment.