ci(release): fall back to NPM_TOKEN when Trusted Publishers isn't configured#29
Closed
aaronstevenwhite wants to merge 1 commit into
Closed
ci(release): fall back to NPM_TOKEN when Trusted Publishers isn't configured#29aaronstevenwhite wants to merge 1 commit into
aaronstevenwhite wants to merge 1 commit into
Conversation
…figured The 0.3.0 npm publish keeps 404'ing with "do not have permission to access" because npmjs.com/package/@idiolect-dev/schema/access has not been allowlisted for this repo + workflow under Trusted Publishers. The previous (0.2.0) release shipped via classic NPM_TOKEN auth, which is still configured as a repo secret. This commit branches the publish step on whether NPM_TOKEN is set: present means token auth (no provenance), absent means Trusted Publishers (with provenance). When the package owner adds the allowlist entry the secret can be removed and the OIDC path takes over automatically.
Contributor
Author
|
Superseded by #30. With Trusted Publishers configured on npmjs.com, the OIDC path in release.yml is sufficient and a token fallback would just add an unused secret + dead code. |
6 tasks
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.
Follow-up to #28. The bundled-npm and corepack issues are fixed (npm 11.13.0 is now invoked successfully via the fetched tarball), but the publish still 404s because npm 11's clearer error message (
do not have permission to access) reveals the npmjs.com Trusted Publishers allowlist for @idiolect-dev/schema does not include this repo + workflow yet. The 0.2.0 release shipped via classic NPM_TOKEN, which is still configured. This PR branches the publish step on whether the secret is present so the release ships while the allowlist is set up.