Skip to content

ci: authenticate the first publish with the token, after all - #5

Closed
catomean wants to merge 1 commit into
mainfrom
ci/token-bootstrap
Closed

ci: authenticate the first publish with the token, after all#5
catomean wants to merge 1 commit into
mainfrom
ci/token-bootstrap

Conversation

@catomean

Copy link
Copy Markdown
Collaborator

The OIDC change one PR ago (#3) was the right destination reached in the wrong order: a trusted publisher is configured on a package, and this package doesn't exist yet. With the token wiring gone and OIDC not yet possible, a tag push would have failed to authenticate by either route.

The bootstrap release therefore uses NPM_TOKEN, now set on this repo. Ordering that works:

  1. this PR → tag → CI publishes v0.1.0 using the token
  2. package exists → configure trusted publisher against publish.yml
  3. delete this env block again
  4. revoke the token, set Require 2FA and disallow tokens

Provenance is unaffectedid-token: write is what npm needs to attest the build, independent of how the publish authenticates.

Mirrors ai-forms#14 so both libraries stay identical.

🤖 Generated with Claude Code

The OIDC change one PR ago was the right destination in the wrong order: a
trusted publisher is configured on a PACKAGE, and this package does not exist
yet. With the token wiring gone and OIDC not yet possible, a tag push would
have failed to authenticate by either route.

The bootstrap release therefore uses NPM_TOKEN (now set on this repo). Once the
package exists, the trusted publisher is configured, this env block goes away
again, and the token is revoked.

Provenance is unaffected — `id-token: write` is what npm needs to attest the
build, independent of how the publish authenticates.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@catomean

Copy link
Copy Markdown
Collaborator Author

Superseded by #6, which reached the same conclusion independently in a parallel session — OIDC cannot do the first publish because a trusted publisher is configured on a package that does not exist yet. Closing this rather than resolving the conflict; #6 is already on main.

@catomean catomean closed this Aug 16, 2026
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.

1 participant