Skip to content

Plugin: analyzer-default

Determines the next SemVer bump by matching commit messages against regular expressions. Choose it when you want custom versioning rules without adopting Conventional Commits.

Terminal window
go install github.com/SemRels/analyzer-default@latest

Each plugin is a standalone Go binary. Keep it on your PATH or reference it with path: in .semrel.yaml. If you keep secrets in a .env file, load them with semrel --env-file .env release.

version: 1
plugins:
- name: analyzer-default
path: analyzer-default
args:
major_pattern: 'BREAKING|major:'
minor_pattern: '^feat'
patch_pattern: '^fix|^perf'
NameRequiredDefaultDescription
SEMREL_PLUGIN_MINOR_PATTERNnoplugin-defined regexRegular expression that triggers a minor bump.
SEMREL_PLUGIN_PATCH_PATTERNnoplugin-defined regexRegular expression that triggers a patch bump.
SEMREL_PLUGIN_MAJOR_PATTERNnoplugin-defined regexRegular expression that triggers a major bump.

This plugin does not require any of the shared SEMREL_* release context variables to do its job.

If a commit message matches major_pattern, the analyzer returns major. Otherwise it falls back to minor_pattern, then patch_pattern, and returns the highest matching bump.