mirror of
https://github.com/bitbaum/threadkit.git
synced 2026-12-06 07:39:54 +01:00
ci: OIDC cannot do the first publish — keep a token for it (#6)
Same fix as ai-forms, before hitting the same failure. Trusted publishing is configured per package on npmjs.com and cannot be configured for a package that has never been published, so the token-free workflow fails on the first release with E404 on the PUT. Co-authored-by: Mao Nakamoto <georgy.butaev@revamp-it.ch> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 file changed
+13
-3
@@ -38,7 +38,17 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# No token: id-token above lets the CLI exchange a short-lived OIDC
|
||||
# credential with npm. Provenance is generated automatically for a public
|
||||
# package from a public repo, so --provenance is not needed either.
|
||||
# OIDC (id-token above) is the preferred credential and needs no secret.
|
||||
# But trusted publishing is configured per package on npmjs.com, and a
|
||||
# package that has never been published cannot have it configured — so
|
||||
# OIDC alone cannot do the FIRST publish. Confirmed on ai-forms: the
|
||||
# provenance statement was signed and logged to sigstore, then the PUT
|
||||
# returned E404 "could not be found or you do not have permission",
|
||||
# which reads like a missing package rather than a missing credential.
|
||||
#
|
||||
# NPM_TOKEN covers only that first publish. Once this package exists and
|
||||
# a trusted publisher is configured, npm prefers OIDC and the secret can
|
||||
# be deleted.
|
||||
- run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
Reference in new issue
Block a user