charlesthomas/github-action-svu
use https://github.com/caarlos0/svu to calculate the next semantic version for your repo by reading the commit log
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 10, 2026
- License
- MIT
Pinned Snippet
uses: charlesthomas/github-action-svu@632a867ee5956df9cc8ace9caeae4c32b4cc4c8b # v1.2.1+3.4.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| cmd | svu sub-command options: next: prints the next version based on the git log current: prints current version major: new major version minor: new minor version patch: new patch version prerelease: new pre release version based on the next version calculated from git log this github action will always run current and provide its value as an output. if cmd is set to current, that is all it will do. in all other cases, the specified sub-command will also be run and output as "next." | no | next |
| clone | git clone the repo before running svu unnecessary if you use actions/checkout ahead of this in your workflow | no | false |
| unshallow | run `git fetch --unshallow` before running `svu` useful if you use actions/checkout ahead of this in your workflow with the default depth ignored if clone is true | no | false |
| pushTag | run `git tag $next && git push --tags` where `$next` is the value calculated by svu if the calulated new version and `svu current` are the same, nothing is pushed | — | — |
| tagMode | svu --tag.mode flag determine if it should look for tags in all branches, or just the current one THIS INPUTS DEFAULT DIFFERS FROM svu DEFAULT In order to preserve reverse-compatibility with this github action, the default INPUT is "current". In svu v3, the FLAG default is "all" | no | current |
| tagPattern | svu --tag.pattern flag ignore tags that do not match the given pattern | no | — |
| tagPrefix | svu --tag.prefix flag sets a tag custom prefix (default "v") | no | v |
| verbose | svu --verbose flag enable logs | no | false |
| always | svu next --always flag if no commits trigger a version change, increment the patch | no | false |
| logDirectory | svu next --log.directory flag only use commits that changed files in the given directories | no | — |
| metadata | svu next --metadata flag sets the version metadata | no | — |
| prerelease | svu prerelease --prerelease or svu next --prelease flag sets the version prerelease | no | — |
| v0 | svu next --v0 flag prevent major version increments if current version is still v0 | no | false |
| pattern | --pattern=PATTERN svu flag "LEGACY! Use tagPattern instead." | no | — |
| prefix | --prefix svu flag LEGACY! Use tagPrefix instead | no | — |
| build | --build=BUILD svu flag LEGACY! Use metadata instead | no | — |
| directory | --directory svu flag LEGACY! Use logDirectory instead | no | — |
| forcePatchIncrement | LEGACY! Use always instead | no | false |
Outputs
| name | description |
|---|---|
| current | the output of `svu current` before running `svu $cmd`, eg `svu next` |
| current_json | the output of `svu current --json` |
| next | the next version, if any cmd other than `current` was used eg `svu next`, `svu prerelease`, `svu major`, etc |
| next_json | — |
| changed | whether the next version calculated by `svu $cmd` matches `svu current` useful if you use `svu next` without `--force-patch-increment` and push the tag yourself outside of this step |