You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci(npm): publish workspaces to npm from main with trusted publishing - #71
Adds a workflow that publishes the npm workspaces (@rtcamp/wp-tooling, eslint-config, stylelint-config, tailwind-config) to npm from main. A release is a PR that bumps a package's version. Once it merges, the workflow publishes that version after a maintainer approves it. The versions on npm today were published by hand.
Changes
.github/workflows/publish-npm-packages.yml, with three jobs:
plan lists workspaces whose version isn't on npm yet. A package that has never been published is skipped with a warning.
check runs npm run check, then npm publish --dry-run for each package, and fails if npm would auto-correct a manifest.
publish waits for approval in the npm environment, then publishes with npm trusted publishing (OIDC, no stored token, provenance attached). Prereleases go to the next tag.
Hardened the way Gutenberg's publish workflow is:
no permissions by default, granted per job;
a protected environment;
no dependency cache;
pinned runner and action SHAs.
@rtcamp/wp-tooling's bin is now bin/wp-tooling.js. npm auto-corrects the ./-prefixed form with a warning, which the check job treats as a failure.
AGENTS.md describes the workflow and the bin rule.
All four packages are already on npm, so the hand-published first version the workflow needs is in place. Before the workflow can publish, a repo or npm admin needs to:
Create the npm environment with required reviewers, limited to main. Do this first: a job that names a missing environment creates it with no reviewers.
Add the trusted publisher in each package's npm settings: rtCamp / wp-tooling / publish-npm-packages.yml / environment npm.
split-npm-packages.yml keeps running for consumers that install from git URLs.
Base automatically changed from
v1.0.0/task/wp-primitives-rename to
mainOctober 1, 2026 17:06
Releases become a version-bump PR instead of a hand publish.
- publish-npm-packages.yml: plan unpublished versions, check + dry-run preview, publish behind the `npm` environment via OIDC
- wp-tooling bin is `bin/wp-tooling.js` so the preview's auto-correct check passes
- AGENTS.md describes the publish workflow and the bin rule
Adi-ty
changed the title
feat: implement npm publish workflow and update package configurations for public registry
ci(npm): publish workspaces to npm from main with trusted publishing
Oct 5, 2026
Pin npm version to ensure preview and publish are reproducible
.github/workflows/publish-npm-packages.yml:178
Using a semver range makes this preview non-reproducible: the check can install one npm release, then the approval-delayed publish job can resolve a newer release with different packing or manifest-normalization behavior. That breaks the stated guarantee that both jobs use the same npm and can let the real publish differ from the approved dry run. Pin the same exact npm version in both jobs.
This issue also appears on line 252 of the same file.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
Registry publication depends on external environment protections and trusted-publisher configuration that require human verification.
Review effort: Balanced Findings: None
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
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 this PR does
Adds a workflow that publishes the npm workspaces (
@rtcamp/wp-tooling,eslint-config,stylelint-config,tailwind-config) to npm frommain. A release is a PR that bumps a package'sversion. Once it merges, the workflow publishes that version after a maintainer approves it. The versions on npm today were published by hand.Changes
.github/workflows/publish-npm-packages.yml, with three jobs:npm run check, thennpm publish --dry-runfor each package, and fails if npm would auto-correct a manifest.npmenvironment, then publishes with npm trusted publishing (OIDC, no stored token, provenance attached). Prereleases go to thenexttag.@rtcamp/wp-tooling'sbinis nowbin/wp-tooling.js. npm auto-corrects the./-prefixed form with a warning, which the check job treats as a failure.AGENTS.mddescribes the workflow and thebinrule.How I verified
npm run checkpasses (1,375 tests), and actionlint is clean.grepprints0on this branch and1onmain, so without thebinchange the next wp-tooling release would fail the check job.Reviewer notes
mainnow that feat(scaffolds)!: target rtcamp/wp-primitives ^2.0 #70 has merged.npmenvironment with required reviewers, limited tomain. Do this first: a job that names a missing environment creates it with no reviewers.publish-npm-packages.yml/ environmentnpm.split-npm-packages.ymlkeeps running for consumers that install from git URLs.