Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
Problem:
release-publish.ymlpublishesgoogle-adkwith a long-lived PyPI token (secrets.PYPI_TOKEN). The token shares one job with build tooling (uv cache enabled) andRELEASE_PAT. Releases have no PEP 740 attestations;google-adk2.10.0 has none on PyPI.Solution:
Split the workflow into three jobs.
build(contents: read)uv build, unchanged.dist/as an artifact.publish(id-token: writeonly,pypienvironment)dist/and uploads it with PyPI Trusted Publishing viapypa/gh-action-pypi-publish(pinned to a commit SHA).merge-backRELEASE_PAT, exactly as before.build, plusGH_REPObecause there's no checkout in this job.Also:
contents: write+pull-requests: writetocontents: read. The merge-back step already authenticates withRELEASE_PAT, so it doesn't useGITHUB_TOKENwrite access; please confirm this matches your setup.secrets.PYPI_TOKENis no longer used.Maintainer action needed before the next release. On PyPI, open
google-adk→ Manage → Publishing and add a trusted publisher:googleadk-pythonrelease-publish.ymlpypiAfter the first successful release, the
PYPI_TOKENsecret can be revoked and deleted.Testing Plan
This change only touches a release workflow; no library code changes, so there are no unit tests to add.
actionlint: passes.zizmor --offline: 0 findings on the new workflow.uv buildfrom a clean checkout with the same commands: buildsgoogle_adk-2.10.0.tar.gzandgoogle_adk-2.10.0-py3-none-any.whl, as today.publishshould upload via OIDC, the PyPI file pages should show attestations, andmerge-backshould open the sync PR as before.Checklist
Additional context
Related: #6601 proposed
id-token: writefor Trusted Publishing, but only its other changes were imported (0075954). This PR is independent of #7304 and does not change the check gate removed in e143cce.This follows PyPA's recommended layout of separate build and publish jobs, with Trusted Publishing: https://docs.pypi.org/trusted-publishers/