Context
Several repos in the org publish to npm (ui, registry, cli, config itself). Each currently has — or will have — its own publish workflow, which means drift over time. A single reusable GitHub Actions workflow in this repo, called via workflow_call, keeps the publish flow consistent and easy to evolve.
What to build
Create .github/workflows/publish-npm.yml as a reusable workflow (on: workflow_call) that:
- Accepts inputs:
package-path (default .), node-version (default 20), dist-tag (default latest)
- Accepts secrets:
NPM_TOKEN
- Runs: install → build → test → publish
- Uses provenance (
--provenance flag on npm publish) for supply-chain attestation
- Posts a comment on the triggering PR / release with the published version
Wire one consumer repo (recommend registry) to the new reusable workflow as an example.
Acceptance criteria
Pointers
Complexity
🟡 Intermediate
Context
Several repos in the org publish to npm (
ui,registry,cli,configitself). Each currently has — or will have — its own publish workflow, which means drift over time. A single reusable GitHub Actions workflow in this repo, called viaworkflow_call, keeps the publish flow consistent and easy to evolve.What to build
Create
.github/workflows/publish-npm.ymlas a reusable workflow (on: workflow_call) that:package-path(default.),node-version(default20),dist-tag(defaultlatest)NPM_TOKEN--provenanceflag onnpm publish) for supply-chain attestationWire one consumer repo (recommend
registry) to the new reusable workflow as an example.Acceptance criteria
Pointers
Complexity
🟡 Intermediate