Skip to content

feat: enable trusted publishing#54

Draft
ObserverOfTime wants to merge 1 commit into
mainfrom
trusted-publishing
Draft

feat: enable trusted publishing#54
ObserverOfTime wants to merge 1 commit into
mainfrom
trusted-publishing

Conversation

@ObserverOfTime

@ObserverOfTime ObserverOfTime commented Dec 14, 2025

Copy link
Copy Markdown
Member

For npm, crates, pypi packages

@ObserverOfTime
ObserverOfTime force-pushed the trusted-publishing branch 2 times, most recently from 744d28a to 3bc4915 Compare December 14, 2025 10:42
@ObserverOfTime ObserverOfTime linked an issue Jun 30, 2026 that may be closed by this pull request
dpezto added a commit to dpezto/tree-sitter-gnuplot that referenced this pull request Jul 23, 2026
Replace the token-authenticated PyPI publish with OIDC trusted publishing,
removing the long-lived PYPI_API_TOKEN from the release path.

tree-sitter/workflows' package-pypi.yml requires PYPI_API_TOKEN and does not
expose id-token: write, and a caller cannot inject permissions into a reusable
workflow's internal jobs. The upstream fix (tree-sitter/workflows#54) is an
unmerged draft, so the workflow is vendored here with that patch applied: the
token secret is optional and the publish job carries id-token: write.

release.yml calls the local copy, grants contents: read + id-token: write to
the reusable workflow, and no longer passes PYPI_API_TOKEN, so
gh-action-pypi-publish authenticates through the OIDC id-token. Requires a
GitHub trusted publisher configured on the PyPI project (workflow release.yml,
environment pypi).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

Trusted publishing without access tokens

1 participant