Skip to content
chevron-up

GitHub Action

Auto Bump Versions

v1.0.0 Latest version

Auto Bump Versions

chevron-up

Auto Bump Versions

Automate bump versions in `CHANGELOG.md` (`Keep a Changelog` format) and other files, then commit and push changes.

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Auto Bump Versions

uses: AlirezaTheH/[email protected]

Learn more about this action in AlirezaTheH/auto-bump-versions

Choose a version

Auto Bump Versions

GitHub action to automate bump version in CHANGELOG.md (Keep a Changelog format) and optionally bump other files' version using BumpVer, then commit and push changes.

Usage

name: Publish
on:
  push:
    branches:
      - main
  workflow_dispatch:

jobs:
  bump-versions:
    runs-on: ubuntu-latest
    steps:
      - uses: alirezatheh/auto-bump-versions@v1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          new-version: 1.2.3
          use-bumpver: true

The action assume:

  • Python and pip are installed (e.g. by actions/setup-python@v3).

Inputs

  • github-token: GitHub token (required).
  • new-version: The version to be bumped. If missing guess the new version using section names in unreleased changes of CHANGELOG.md (Keep a Changelog format) (optional).
  • use-bumpver: If use BumpVer to bump local version in files other than CHANGELOG.md. If this is true your project root must contain bumpver.toml file, Defaults to false (optional).

Outputs

  • new-version: New version to be released. If new-version input is missing, this is the guessed version.

Acknowledgements

This action is inspired by pypi-auto-publish