File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Sign probe (temporary, # 24)
2+
3+ on : pull_request
4+
5+ permissions :
6+ contents : read
7+ id-token : write
8+
9+ jobs :
10+ sign :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v7
14+ - uses : astral-sh/setup-uv@v7
15+ - name : Render
16+ run : |
17+ uvx --with jinja2-time copier copy --defaults --trust --vcs-ref HEAD \
18+ --data project_name=demo-lib --data project_description="Demo" \
19+ --data author_name="Bedrock Python" --data author_email="maintainers@example.com" \
20+ . "${RUNNER_TEMP}/demo-lib"
21+ - name : Build, then the generated sign step exactly as rendered
22+ working-directory : ${{ runner.temp }}/demo-lib
23+ run : |
24+ uv build
25+ SIGN=$(uv run --no-project --with pyyaml python -c '
26+ import yaml
27+ steps = yaml.safe_load(open(".github/workflows/publish.yml"))["jobs"]["publish"]["steps"]
28+ print(next(s["run"] for s in steps if "pypi-attestations" in s.get("run", "")))')
29+ echo "$SIGN"
30+ eval "$SIGN"
31+ ls -la dist
32+ - name : Verify against this workflow's identity
33+ working-directory : ${{ runner.temp }}/demo-lib
34+ run : |
35+ uvx pypi-attestations verify attestation \
36+ --identity "https://github.com/${GITHUB_REPOSITORY}/.github/workflows/sign-probe.yml@${GITHUB_REF}" \
37+ dist/*.whl dist/*.tar.gz
38+ uvx pypi-attestations inspect dist/*.whl.publish.attestation | head -20
You can’t perform that action at this time.
0 commit comments