ci: publish from the npm environment - #22
Merged
Merged
Conversation
The npm environment only allows deployments from main, so the OIDC token for trusted publishing can only be minted for main.
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.
What & why
The publish job now runs in the
npmGitHub environment (audit item M4, option C). The environment is already created with these settings:main(type branch, so a tag namedmaindoesn't count)The OIDC token for trusted publishing can therefore only be issued to a job running from
main. A copy of the publish job on another branch, or a manual run from another ref, can't publish.Rollout order. With an environment set, the OIDC
subclaim becomesrepo:clappingmonkey/opencode-circadian:environment:npm, so npm's trusted publisher config has to match.npm.No release PR is pending, so nothing publishes between the two steps. If a publish ever fails on a mismatch, fix the npm setting and use "Re-run failed jobs" on the publish job.
Closes: N/A (audit item M4)
Behavior impact
periodFor, boundaries, gentle override)dayTheme,nightTheme,dayStartHour,nightStartHour,checkIntervalMs,toast) — README options table updatedpackage.jsonexports,files, published contents)Testing
npm run typecheckpasses (run by CI; this PR only changes a workflow)npm testpasses (run by CI; this PR only changes a workflow)Also verified:
Checklist
(enforced by the PR Title check; drives the release-please version bump)