Lesson Completion
Back to course

Version Bump Workflow

Beginner
7 minutes4.7Git

The Hook (The "Byte-Sized" Intro)

A version bump is the smallest signal with the biggest impact. Changing 1.2.0 to 1.3.0 tells users "new features, safe to upgrade." Changing it to 2.0.0 says "breaking changes, read the notes." But the process of bumping needs to be consistent — update the files, commit, tag, push. Here's the 5-step recipe.

📖 What is a Version Bump Workflow?

A version bump workflow is a repeatable process for updating version numbers, committing the change, creating a tag, and pushing — ensuring every release follows the same steps.

Conceptual Clarity

The 5-step workflow:

StepActionExample
1. Decide bump typeMAJOR / MINOR / PATCHBreaking change → MAJOR
2. Update version filespackage.json, pom.xml, etc.1.2.0 → 1.3.0
3. Commit the bumpchore: bump version to 1.3.0Conventional commit
4. Tag the commitgit tag -a v1.3.0 -m "msg"Annotated tag
5. Push commit + taggit push --follow-tagsPush both at once

Real-Life Analogy

Version bumping is like updating a product label before shipping. You decide what changed (minor tweak or major redesign), update the label, apply it to the package, and send it out for delivery.

Visual Architecture

flowchart LR DECIDE["1. Decide MAJOR/MINOR/PATCH"] --> UPDATE["2. Update version files"] UPDATE --> COMMIT["3. Commit: chore: bump"] COMMIT --> TAG["4. git tag -a v1.3.0"] TAG --> PUSH["5. git push --follow-tags"] style DECIDE fill:#1a1a2e,stroke:#ffd700,color:#ffd700 style PUSH fill:#1b2d1b,stroke:#53d8fb,color:#53d8fb

Why It Matters

  • Consistency: Same process every time = fewer mistakes.
  • Traceability: Version bump commit + tag create a clear audit trail.
  • CI trigger: Tag push triggers the release pipeline.
  • Team confidence: Everyone knows the release process.

Code

bash
# ─── Manual version bump ─── # 1. Edit version # In package.json: "version": "1.3.0" # In pyproject.toml: version = "1.3.0" # 2. Commit the change git add package.json git commit -m "chore: bump version to 1.3.0" # 3. Tag git tag -a v1.3.0 -m "Release v1.3.0: add search feature" # 4. Push everything git push origin main --follow-tags # ─── npm shortcut ─── npm version minor -m "Release v%s" # Automatically: bumps package.json, commits, tags git push --follow-tags # ─── Automated with standard-version ─── npx standard-version --release-as minor # Bumps version, updates CHANGELOG.md, commits, tags git push --follow-tags

Key Takeaways

  • Follow the same 5 steps every time: decide → update → commit → tag → push.
  • Use --follow-tags to push the commit and tag together.
  • npm version provides a built-in shortcut for Node.js projects.
  • Automation tools like standard-version handle the entire process.

Interview Prep

  • Q: What is a version bump workflow? A: A repeatable process for incrementing the version number, committing the change, creating a tag, and pushing both to the remote. It ensures every release follows the same consistent steps.

  • Q: What is the purpose of the version bump commit? A: It records the version change in Git history, ensuring the source code's version number matches the tag. This commit is typically a chore: conventional commit like "chore: bump version to 1.3.0".

  • Q: How does npm version simplify the process? A: npm version <major|minor|patch> automatically updates package.json, creates a commit with the version change, and creates a Git tag — all in one command. You just need to push afterward.

Topics Covered

Git ReleasesVersioning

Tags

#git#version#workflow#releases

Last Updated

2026-02-13