Skip to content

Publish google-adk to PyPI with Trusted Publishing (no stored token, add attestations)聽#7333

Description

@gypsy5oul

馃敶 Required Information

Is your feature request related to a specific problem?

.github/workflows/release-publish.yml uploads google-adk with a long-lived PyPI token (UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}). The token is available in the same job that installs build tooling with the uv cache enabled, and that also holds RELEASE_PAT. As a result, published releases carry no provenance: google-adk 2.10.0 has no PEP 740 attestations on PyPI.

ADK is increasingly used in enterprise agent deployments, and users are starting to verify where their dependencies were built.

Describe the Solution You'd Like

Split release-publish.yml into three jobs:

  • build: read-only, uv cache off. Runs the existing version handling and uv build.
  • publish: id-token: write only, pypi environment. Uploads with PyPI Trusted Publishing (pypa/gh-action-pypi-publish), which also adds attestations.
  • merge-back: creates the merge-back PR with RELEASE_PAT, as today.

No change to versioning, the branch check, or the release flow.

Impact on your work

Supply-chain hardening. It removes a long-lived publishing credential, and it lets ADK users verify that each release was built by this workflow.

Willingness to contribute

Yes. I've signed the Google CLA and have the change prepared. I'll open a PR once a maintainer confirms the direction.

馃煛 Recommended Information

Describe Alternatives You've Considered

uv publish --trusted-publishing always in the existing job. That removes the stored token, but the credential would still share a job with build tooling and RELEASE_PAT, and uv does not generate attestations. PyPA recommends separate build and publish jobs.

Additional Context

Related

Activity

  1. added
    core[Component] This issue is related to the core interface and implementation
    on Sep 29, 2026
  2. sanketpatil06 commented on Sep 29, 2026

    @sanketpatil06

    Hi @gypsy5oul,

    The proposal to implement PyPI Trusted Publishing for google-adk to enhance supply-chain security and add PEP 740 attestations is a valuable improvement.

    Splitting the release-publish.yml workflow into distinct build, publish, and merge-back jobs with id-token: write scoped to the publish job is the right approach.

    Please feel free to open a PR with your prepared changes, and we will review the implementation details there.

  3. added
    needs review[Status] The PR/issue is awaiting review from the maintainer
    on Sep 29, 2026
  4. gypsy5oul commented on Sep 29, 2026

    @gypsy5oul
    Author

    Thanks @sanketpatil06! PR is up: #7342. One maintainer step is needed before the next release: add the trusted publisher on PyPI (google-adk -> Manage -> Publishing: owner google, repo adk-python, workflow release-publish.yml, environment pypi). Details are in the PR description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

core[Component] This issue is related to the core interface and implementationneeds review[Status] The PR/issue is awaiting review from the maintainer

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions