Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build attestations. Closes #343 #371

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/apple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ jobs:
runner: macos-13
py: 'cpython-3.13'
options: 'freethreaded+pgo+lto'

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

needs:
- pythonbuild
runs-on: ${{ matrix.build.runner }}
Expand Down Expand Up @@ -233,6 +239,11 @@ jobs:
./build-macos.py --target-triple ${{ matrix.build.target_triple }} --python ${{ matrix.build.py }} --options ${{ matrix.build.options }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-path: dist/*

- name: Upload Distributions
uses: actions/upload-artifact@v4
with:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,11 @@ jobs:
py: 'cpython-3.12'
options: 'lto'

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

needs:
- pythonbuild
- image
Expand Down Expand Up @@ -861,6 +866,11 @@ jobs:
fi

build/pythonbuild validate-distribution ${EXTRA_ARGS} dist/*.tar.zst

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-path: dist/*

- name: Upload Distribution
uses: actions/upload-artifact@v4
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ jobs:
vcvars: 'vcvars64.bat'
options: 'freethreaded+pgo'

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

needs: pythonbuild
runs-on: 'windows-2019'
steps:
Expand Down Expand Up @@ -101,6 +106,11 @@ jobs:
run: |
$Dists = Resolve-Path -Path "dist/*.tar.zst" -Relative
.\pythonbuild.exe validate-distribution --run $Dists

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-path: dist/*

- name: Upload Distributions
uses: actions/upload-artifact@v4
Expand Down