fix(ci): publish opencode-plugin via npm OIDC trusted publishing#862
Merged
Conversation
This was referenced Jun 16, 2026
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.
The
0.1.0-alpha.2release run failed atnpm publishwithE404 PUT. Root cause: setup-node'sregistry-urlwrites a token-based.npmrc(NODE_AUTH_TOKEN), and npm uses that token in preference to OIDC. That token has@obsigna/sdk-tsaccess but not the new@obsigna/opencode-plugin, so the PUT 404s. Provenance signed fine (that's a separate GitHub→sigstore OIDC path), but registry auth never used the trusted publisher.Fix
registry-urlfrom setup-node so no token.npmrcis written — npm then mints a short-lived publish credential from the GitHub OIDC token (trusted publishing).id-token: writewas already granted.environment: release-opencode-pluginfrom the job — the npm trusted-publisher config has no environment set, so the OIDC claim must carry none to match. (That GitHub environment was never created anyway.)npm install -g npm@latestbefore publish — OIDC trusted publishing requires it; belt-and-suspenders against runner image drift.No change to package contents or version. After merge I'll re-point the
opencode-plugin-v0.1.0-alpha.2tag at the fixed commit so the corrected workflow runs.Why not just grant the token access?
The token would work, but you've set up OIDC trusted publishing — this makes the workflow actually use it (no long-lived secret, provenance from the OIDC identity).