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
semrel plugin install @semrel/analyzer-default

semrel plugin install downloads the binary to .semrel/plugins/ and updates .semrel.lock. Commit .semrel.lock to pin the version for your team.

Pre-built, signed multi-platform images (linux/amd64, linux/arm64) are published on every release:

Terminal window
docker pull ghcr.io/semrels/analyzer-default:latest

Verify the image signature with cosign:

Terminal window
cosign verify ghcr.io/semrels/analyzer-default:latest \
--certificate-identity-regexp 'https://github.com/SemRels/analyzer-default/.github/workflows/release.yml.*' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
version: 1
plugins:
- uses: @semrel/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.