Skip to content
Latchkey

npm version: Bump and Tag Releases

npm version updates the version, commits, and creates a git tag.

In a release pipeline npm version standardizes the bump. Disable its git actions when a separate tool owns tagging.

Common usage

  • npm version patch|minor|major
  • --no-git-tag-version - bump only
  • --preid=rc with prerelease
  • respects semver

Example in CI

Bump without creating a tag (the workflow tags separately).

shell
npm version patch --no-git-tag-version

In CI

If you let npm version push tags, configure a git identity first. Many teams use semantic-release instead to derive versions from commits.

Key takeaways

  • npm version bumps, commits, and tags.
  • --no-git-tag-version for bump-only.
  • Configure git identity for tagging in CI.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →