ci: authenticate the first publish with the token, after all - #14
Merged
Conversation
I removed this env block one PR ago in favour of trusted publishing, and that was the right destination reached in the wrong order: a trusted publisher is configured on a PACKAGE, and neither package exists yet. With the token wiring gone and OIDC not yet possible, a tag push would have failed to authenticate by either route. So the bootstrap release authenticates with NPM_TOKEN (now set correctly on this repo). Once the package exists on the registry, the trusted publisher is configured against this workflow, this env block goes away again, and the token is revoked — that ordering actually works. Node 24 stays: it is required for OIDC later and harmless now. Provenance is unaffected. `id-token: write` is what npm needs to attest the build, and that is independent of how the publish authenticates — so the bootstrap release still gets a real attestation rather than --provenance=false. Co-Authored-By: Claude Opus 5 <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.
I removed this
envblock one PR ago (#13) in favour of trusted publishing. That was the right destination reached in the wrong order: a trusted publisher is configured on a package, and neither package exists yet. With the token wiring gone and OIDC not yet possible, a tag push would have failed to authenticate by either route.So the bootstrap release authenticates with
NPM_TOKEN— now set correctly on this repo. The ordering that actually works:publish.ymlenvblock againnode-version: '24'stays — required for OIDC in step 2, harmless now.Provenance is unaffected.
id-token: writeis what npm needs to attest the build, and that's independent of how the publish authenticates. So this bootstrap release still gets a real attestation, rather than the--provenance=falseI'd been proposing for a laptop publish.🤖 Generated with Claude Code