Repository navigation
chore: add authorized npm publication workflow - #336
Conversation
|
Warning Review limit reached
Next review available in: 9 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
Comment |
Summary
This PR adds the repository-owned publication path that follows the initial synchronized
smocketandsmocket-clientrelease.Publish releaseworkflow that accepts one exact synchronized version and refuses any repository or ref other thanelectrohyun/smocketonmain.smocketpeer before either registry write.smockettarball first and the manifest-ownedsmocket-clienttarball second in separate jobs.Publication authority
The workflow has only a
workflow_dispatchtrigger, so pull requests and forks do not enter a registry mutation path. An initial authorization job also requires the canonical repository andmainref.Only the two publish jobs receive
id-token: write. They run on GitHub-hosted runners behind thenpmenvironment and otherwise retain read-only repository permission. Publication uses npm trusted publishing with a short-lived GitHub OIDC identity; no npm token is added to the repository or workflow, and this change does not alter npm 2FA, token, or package publishing-access settings.Candidate and publication chain
The preflight job creates the candidate once and uploads its manifest and two tarballs under the workflow run ID. The root and client jobs independently download that same artifact and call a small publication helper that reloads the manifest before invoking npm. The helper accepts only an exact version, an HTTPS registry without embedded credentials, and one of the two released package names.
Keeping the two registry writes in separate jobs preserves the required root-before-client order and allows a failed client job to be resumed without intentionally rerunning a successful root publish. Re-uploading the run's artifact set is not enabled, so a resumed downstream job continues from the original candidate.
Failure and certification behavior
The final job waits for and installs both exact registry versions, checks their resolved identities and exact peer relationship, and exercises the shared registry behavior through the existing clean-adoption fixtures. Its successful conclusion is the certification signal. GitHub tags and Releases neither trigger nor replace it.
The publication documentation now records the authority boundary, required external trusted-publisher and environment configuration, ordered release chain, and the existing deprecation or fix-forward runbook. A partial publication or failed final check remains red and follows that runbook.
Closes #320
Related to #284