Skip to content

Bump Version on Tag

Bump Version on Tag #6

Workflow file for this run

name: "Bump Version on Tag"
on:
push:
tags:
- "v*.*"
workflow_dispatch:
jobs:
bump-version:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v31
- uses: cachix/cachix-action@v16
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv
- name: Bump version
run: devenv shell -- cargo set-version -p devenv --bump patch
- name: Get new version
id: get-version
run: echo "VERSION=$(nix eval --raw --expr '(builtins.fromTOML (builtins.readFile ./Cargo.toml)).workspace.package.version' --impure)" >> $GITHUB_OUTPUT
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v6
with:
commit_message: "Next release is ${{ steps.get-version.outputs.VERSION }}"
file_pattern: "Cargo.toml Cargo.lock"