git semantic version conventional commit bumper
  • Rust 85.6%
  • Nix 8.7%
  • Zig 5.6%
  • Python 0.1%
Find a file
renovate c3037b42d8
All checks were successful
check / check (push) Successful in 32s
chore(deps): update rust crate regex to v1.13.1 (#22)
2026-07-16 05:17:47 -04:00
.forgejo chore(deps): update spotdemo4/nix-init action to v1.57.0 (#17) 2026-07-11 05:10:54 -04:00
.github/workflows chore(deps): update spotdemo4/nix-init action to v1.57.0 (#17) 2026-07-11 05:10:54 -04:00
.vscode chore: align with trev.zip/template/rust 2026-06-02 05:05:33 -04:00
.zed chore: align with trev.zip/template/rust 2026-06-02 05:05:33 -04:00
src feat(bump): add version bumping for gradle project files 2026-07-11 03:29:11 -04:00
tests bump: v0.18.1 -> v0.19.0 2026-07-13 22:02:39 +00:00
.envrc.project chore: align with trev.zip/template/rust 2026-06-02 05:05:33 -04:00
.gitignore chore: align with trev.zip/template/rust 2026-06-02 05:05:33 -04:00
action.yaml bump: v0.18.1 -> v0.19.0 2026-07-13 22:02:39 +00:00
AGENTS.md docs(agents): update task completion and formatting requirements 2026-06-02 05:10:12 -04:00
Cargo.lock chore(deps): update rust crate regex to v1.13.1 (#22) 2026-07-16 05:17:47 -04:00
Cargo.toml bump: v0.18.1 -> v0.19.0 2026-07-13 22:02:39 +00:00
CLAUDE.md feat: gleam, ci refactor 2026-04-29 04:22:52 -04:00
flake.lock chore(deps): lock file maintenance (#18) 2026-07-12 05:58:41 -04:00
flake.nix bump: v0.18.1 -> v0.19.0 2026-07-13 22:02:39 +00:00
LICENSE feat: gleam, ci refactor 2026-04-29 04:22:52 -04:00
README.md feat(bump): add version bumping for gradle project files 2026-07-11 03:29:11 -04:00
treefmt.toml chore: align with trev.zip/template/rust 2026-06-02 05:05:33 -04:00

git version bumper

check vulnerable rust flakehub

  • determines the semantic versioning impact (major, minor or patch) of the conventional commits since the last git tag
  • increments the git tag by the impact (v0.0.1 -> PATCH -> v0.0.2)
  • applies the version bump to files given as arguments (bumper [files...])
  • applies the version bump in directories given as arguments to supported project files (README.md, action.yaml, action.yml, package.json, package-lock.json, build.gradle, build.gradle.kts, gradle.properties, Cargo.toml, Cargo.lock, pyproject.toml, uv.lock, build.zig.zon, gleam.toml, flake.nix, CMakeLists.txt)
  • skips likely vendored paths (vendor, node_modules) and symlinks during directory scans
  • commits the bumped files and pushes them with the new git tag

This works well as a github action. Have it run on every push to main and it will bump the version for every change, or run it on a schedule to increase the version if there were any new changes.

Usage

bumper [paths...]

Why

Most of the popular actions are antagonistic about making any changes to the source code during version bumps. Unfortunately for me, two of the technologies I use quite heavily (nix & npm) use version numbers in source, and I would rather deal with the occasional rebase than have version numbers out of sync. Of those that support bumping versions in source, I didn't find any I liked that also supported bumping for arbitrary files. I've found it quite common to have a version that needs to be updated in a readme, or a hardcoded version in the source code.

Install

Action

- name: Bump
  uses: spotdemo4/bumper@v0.16.3
  with:
    commit: true # commit changes after bumping, default true
    push: true # push changes after bumping, default true
    force: false # force at least a PATCH version bump, default false

    # list of files to bump versions in
    files: |-
      action.yaml
      README.md

    # conventional commit types for MAJOR version bumps, default "BREAKING CHANGE"
    major_types: |-
      BREAKING CHANGE

    # conventional commit types for MINOR version bumps, default "feat"
    minor_types: |-
      feat

    # conventional commit types for PATCH version bumps, default "fix"
    patch_types: |-
      fix

    # conventional commit scopes to skip over, default "ci"
    skip_scopes: |-
      ci

Nix

nix run github:spotdemo4/bumper

Flake

inputs = {
    bumper = {
        url = "github:spotdemo4/bumper";
        inputs.nixpkgs.follows = "nixpkgs";
    };
};

outputs = { bumper, ... }: {
    devShells.x86_64-linux.default = pkgs.mkShell {
        packages = [
            bumper.x86_64-linux.default
        ];
    };
}

also available from the nix user repository as nur.repos.trev.bumper

Docker

docker run -it \
  -w /app \
  -v "$(pwd):/app" \
  -v "$HOME/.ssh:/root/.ssh" \
  ghcr.io/spotdemo4/bumper:0.16.3