npm Publishing Setup
This repository publishes public scoped packages under @brightweblabs/* and the unscoped create-bw-app CLI package.
Requirements
- Own or control the
@brightweblabsnpm scope. - Confirm the unscoped package name
create-bw-appis available to publish. - Create an npm automation token.
- Add
NPM_TOKENto the GitHub repository secrets.
First-time npm setup
- Log into npm with the account that owns the
@brightweblabsscope and will publishcreate-bw-app. - Confirm the scope exists and can publish public packages.
- Confirm the unscoped CLI package name is available or already owned by the BrightWeb account.
- Create an automation token in npm.
- Add that token to GitHub as
NPM_TOKEN.
Release flow
- Add a changeset:
pnpm changeset
- Merge the resulting changeset PR or your feature PR into
main. - GitHub Actions creates or updates a release PR.
- Merge the release PR.
- GitHub Actions publishes the changed public packages, including
create-bw-app, to npm.
Local publish testing
To dry-run release state locally:
pnpm release:check
To version packages locally:
pnpm release:version
To publish manually after authenticating with npm:
pnpm release:publish
Important note
Public npm publishing is separate from GitHub visibility. A public GitHub repo does not automatically grant ownership of the @brightweblabs npm scope or the unscoped create-bw-app package name.
Repo source
docs/operations/npm-publishing.mdThis page is rendered directly from the root docs folder. Edit the markdown there, not inside the app.