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 GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jul 10, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: charlesthomas/github-action-svu@632a867ee5956df9cc8ace9caeae4c32b4cc4c8b # v1.2.1+3.4.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
cmdsvu 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."nonext
clonegit clone the repo before running svu unnecessary if you use actions/checkout ahead of this in your workflownofalse
unshallowrun `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 truenofalse
pushTagrun `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
tagModesvu --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"nocurrent
tagPatternsvu --tag.pattern flag ignore tags that do not match the given patternno
tagPrefixsvu --tag.prefix flag sets a tag custom prefix (default "v")nov
verbosesvu --verbose flag enable logsnofalse
alwayssvu next --always flag if no commits trigger a version change, increment the patchnofalse
logDirectorysvu next --log.directory flag only use commits that changed files in the given directoriesno
metadatasvu next --metadata flag sets the version metadatano
prereleasesvu prerelease --prerelease or svu next --prelease flag sets the version prereleaseno
v0svu next --v0 flag prevent major version increments if current version is still v0nofalse
pattern--pattern=PATTERN svu flag "LEGACY! Use tagPattern instead."no
prefix--prefix svu flag LEGACY! Use tagPrefix insteadno
build--build=BUILD svu flag LEGACY! Use metadata insteadno
directory--directory svu flag LEGACY! Use logDirectory insteadno
forcePatchIncrementLEGACY! Use always insteadnofalse
namedescription
currentthe output of `svu current` before running `svu $cmd`, eg `svu next`
current_jsonthe output of `svu current --json`
nextthe next version, if any cmd other than `current` was used eg `svu next`, `svu prerelease`, `svu major`, etc
next_json
changedwhether 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