publish
Publish the packages to the npm registry, or other registries, without bump, commit nor tag.
Usage
bash
relizy publish [options]publish is the third step of release. It:
- finds the packages to publish (public packages only, the private ones are never published);
- checks the access to the registry (npm and pnpm, not Yarn nor Bun) and the
workspace:dependencies (seepublish.checkWorkspaceDependencies); - runs the build command, only when
--build-cmdorpublish.buildCmdis set; - publishes the packages, each after its internal dependencies, with the package manager of the project.
Alone, it publishes the current versions: run it after bump. The global options apply too (--dry-run, --group...).
Options
| Flag | Description | Config |
|---|---|---|
--registry <url> | Registry to publish to: every package goes there, on top of its non-exclusive publish.registries entries | publish.registry |
--tag <tag> | Dist-tag of the publication. Default: latest for a stable version, next for a prerelease | publish.tag |
--access <type> | public or restricted | publish.access |
--otp <code> | One-time password of the registry (2FA) | publish.otp |
--build-cmd <cmd> | Command run before publishing. Quote it, it is one argument: --build-cmd "pnpm build" | publish.buildCmd |
--publish-token <token> | Registry token, for npm, pnpm and bun (written to a temporary .npmrc) | tokens.registry |
--skip-existing-versions | Skip the packages whose version is already on the registry instead of failing | publish.skipExistingVersions |
Without --publish-token, the token comes from the config or the environment, see Tokens.
Examples
bash
# Preview the publication
relizy publish --dry-run
# A beta, installed with my-package@beta
relizy publish --tag beta
# Build first
relizy publish --build-cmd "pnpm build"
# A re-run publishes only what is missing
relizy publish --skip-existing-versions