Files
gitbump/README.md
T
meda 54a7b1e6d8
Gitbump CI / test (push) Successful in 46s
Gitbump CI / build (push) Successful in 28s
Gitbump CI / notify-failure (push) Skipped
feat: preserve fixed upstream versions with fork suffixes
2026-09-25 10:02:33 +02:00

51 lines
1.5 KiB
Markdown

# gitbump
Automatically bump version and tag based on commit messages.
## Usage as Gitea/GitHub Action
Add this to your workflow:
```yaml
jobs:
bump:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.23'
- uses: https://lab.zlymeda.dynu.net/actions/gitbump@master
```
For a fixed base version with an incrementing fork suffix:
```yaml
- uses: https://lab.zlymeda.dynu.net/actions/gitbump@master
with:
bump: suffix
suffix: meda
```
### Inputs
| Input | Description | Default |
|-------|-------------|---------|
| `dry-run` | Show what would be done without making changes | `false` |
| `bump` | Force specific bump type (`major`, `minor`, `patch`, or `suffix`) | |
| `suffix` | Suffix label used when creating the first suffix | |
| `prefix` | Version prefix | `v` |
| `no-push` | Create tag but don't push to remote | `false` |
| `major-patterns` | Comma-separated list for major version bumps | `bump major,breaking change` |
| `minor-patterns` | Comma-separated list for minor version bumps | `bump minor,feat` |
| `patch-patterns` | Comma-separated list for patch version bumps | `bump patch,fix` |
| `chore-patterns` | Comma-separated list for commits that should be ignored | `chore,bump:skip` |
## TODO
- consider using https://github.com/go-git/go-git
- could read changelog or something to create an annotated tag