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

ci: Add GitHub artifact attestations to package distribution #993

Merged

Conversation

matthewfeickert
Copy link
Member

updates:
- [github.com/python-jsonschema/check-jsonschema: 0.28.3 → 0.28.4](python-jsonschema/check-jsonschema@0.28.3...0.28.4)
@HDembinski HDembinski merged commit a2fe2ef into scikit-hep:develop May 23, 2024
9 checks passed
@HDembinski
Copy link
Member

Thanks, this will be tested on next release.

@matthewfeickert matthewfeickert deleted the ci/add-artifact-attestations branch May 23, 2024 15:24
@matthewfeickert
Copy link
Member Author

matthewfeickert commented May 23, 2024

Once this runs during a release the attestations will be uploaded to https://github.com/scikit-hep/iminuit/attestations and can be verified from a wheel or sdist using the gh attestation verify CLI API. c.f. scikit-hep/pyhf#2473 for examples of that.

@HDembinski
Copy link
Member

@matthewfeickert The release failed in the upload stage, see https://github.com/scikit-hep/iminuit/actions/runs/9349824358/job/25732717796
Do you have an idea? I am asking because you changed some permissions in the release script. The change looked ok to me, but we did not test it.

@HDembinski
Copy link
Member

Nevermind, I have not yet added github as trusted publisher for iminuit. I did this for resample but apparently not iminuit.

@matthewfeickert
Copy link
Member Author

https://github.com/scikit-hep/iminuit/attestations are now up and working. 👍

$ python -m pip download --no-binary :all: --no-deps iminuit
Collecting iminuit
  Downloading iminuit-2.26.0.tar.gz (2.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.9/2.9 MB 16.2 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Saved ./iminuit-2.26.0.tar.gz
Successfully downloaded iminuit
$ gh attestation verify iminuit-*.tar.gz --repo scikit-hep/iminuit
Loaded digest sha256:a51233fbf1c2e008aa584f9eea65b6c30ed56624e4dea5d4e53370ccd84c9b4e for file://iminuit-2.26.0.tar.gz
Loaded 1 attestation from GitHub API
✓ Verification succeeded!

sha256:a51233fbf1c2e008aa584f9eea65b6c30ed56624e4dea5d4e53370ccd84c9b4e was attested by:
REPO                PREDICATE_TYPE                  WORKFLOW                                     
scikit-hep/iminuit  https://slsa.dev/provenance/v1  .github/workflows/release.yml@refs/heads/main
$ python -m pip download --no-deps iminuit
Collecting iminuit
  Downloading iminuit-2.26.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (11 kB)
Downloading iminuit-2.26.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (428 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 428.6/428.6 kB 4.4 MB/s eta 0:00:00
Saved ./iminuit-2.26.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Successfully downloaded iminuit
$ gh attestation verify iminuit-*.whl --repo scikit-hep/iminuit
Loaded digest sha256:8b32825029cebbc0df3b85cbdb389d7edf4bf608bd09d1f19efa098fbbfefaf4 for file://iminuit-2.26.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Loaded 1 attestation from GitHub API
✓ Verification succeeded!

sha256:8b32825029cebbc0df3b85cbdb389d7edf4bf608bd09d1f19efa098fbbfefaf4 was attested by:
REPO                PREDICATE_TYPE                  WORKFLOW                                     
scikit-hep/iminuit  https://slsa.dev/provenance/v1  .github/workflows/release.yml@refs/heads/main

Thanks for the release, @HDembinski!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants