feat: enable trusted publishing - #54
Draft
ObserverOfTime wants to merge 1 commit into
Draft
Conversation
ObserverOfTime
force-pushed
the
trusted-publishing
branch
2 times, most recently
from
December 14, 2025 10:42
744d28a to
3bc4915
Compare
ObserverOfTime
force-pushed
the
trusted-publishing
branch
from
December 14, 2025 10:45
3bc4915 to
5f93588
Compare
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>
dpezto
added a commit
to dpezto/tree-sitter-gnuplot
that referenced
this pull request
Jul 23, 2026
ci(release): publish to npm and crates.io via OIDC trusted publishing Extend OIDC trusted publishing to the npm and crates.io release jobs, removing the long-lived NPM_TOKEN and CARGO_REGISTRY_TOKEN from the release path (the PyPI job already moved to OIDC). As with PyPI, tree-sitter/workflows' package-npm.yml and package-crates.yml require their token secrets and expose no id-token permission, and the upstream fix (tree-sitter/workflows#54) is an unmerged draft, so both are vendored here with that patch applied and adapted per registry: - npm: the auth token is optional and the publish job carries id-token: write. npm is upgraded to a trusted-publishing-capable release (>= 11.5.1) before publish, since the bundled npm predates OIDC support. When NODE_AUTH_TOKEN is unset, npm publish authenticates through the OIDC id-token. - crates.io: the registry token is optional and the publish job carries id-token: write. When no token is set, rust-lang/crates-io-auth-action mints a short-lived token via OIDC, which cargo publish then uses. release.yml calls the local copies, grants contents: read + id-token: write to each reusable workflow, and no longer passes the token secrets. Both require a GitHub trusted publisher configured on the respective registry (workflow release.yml; environments npm and crates). Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.
For npm, crates, pypi packages