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.
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: trueThe action assume:
- Python and pip are installed (e.g. by
actions/setup-python@v3).
github-token: GitHub token (required).new-version: The version to be bumped. If missing guess the new version using section names in unreleased changes ofCHANGELOG.md(Keep a Changelog format) (optional).use-bumpver: If useBumpVerto bump local version in files other thanCHANGELOG.md. If this istrueyour project root must containbumpver.tomlfile, Defaults tofalse(optional).
new-version: New version to be released. Ifnew-versioninput is missing, this is the guessed version.
This action is inspired by pypi-auto-publish