Skip to content

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:

  1. finds the packages to publish (public packages only, the private ones are never published);
  2. checks the access to the registry (npm and pnpm, not Yarn nor Bun) and the workspace: dependencies (see publish.checkWorkspaceDependencies);
  3. runs the build command, only when --build-cmd or publish.buildCmd is set;
  4. 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 ​

FlagDescriptionConfig
--registry <url>Registry to publish to: every package goes there, on top of its non-exclusive publish.registries entriespublish.registry
--tag <tag>Dist-tag of the publication. Default: latest for a stable version, next for a prereleasepublish.tag
--access <type>public or restrictedpublish.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-versionsSkip the packages whose version is already on the registry instead of failingpublish.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

See Also ​