yarn npm publish — Yarn CLI reference
Publish the active workspace to an npm registry.
yarn npm publish
Publish the active workspace to an npm registry.
This command packs the active workspace and uploads it to the registry selected for publishing. The registry is resolved from publishConfig.registry when present, then from npmPublishRegistry, then from the regular npm registry configuration.
The published package must have both a name and a version, and workspaces marked as private: true cannot be published.
The publish access is selected in order of precedence: the --access option, then publishConfig.access, then the npmPublishAccess configuration setting. The supported values are public and restricted.
By default, attempting to publish a version that already exists on the registry is an error. Use --tolerate-republish to check first and skip the upload when the same version is already known by the registry.
Access level for the published package (public or restricted)
Dist-tag to attach to the published version
Skip the upload if the registry already contains this version
One-time password to use when the registry requires two-factor authentication
Generate and upload a provenance statement for the package
Print what would be published without uploading anything
Output the result as JSON