CLI Reference
Global flags
Section titled “Global flags”These flags are available on every command:
| Flag | Default | Description |
|---|---|---|
--config | .semrel.yaml | Path to the configuration file |
--dry-run | false | Simulate the release without making any changes |
--version | — | Print the semrel version and exit |
--help | — | Show help for any command |
semrel release
Section titled “semrel release”Runs the full release pipeline:
- Loads plugins from
.semrel/ - Verifies CI conditions (
CIConditionPlugin) - Fetches commits since the last release (
ProviderPlugin.GetCommitsSince) - Analyses commits and determines the version bump (
CommitAnalyzerPlugin) - Generates the changelog (
ChangelogGeneratorPlugin) - Updates version strings in tracked files (
FilesUpdaterPlugin) - Creates the git tag and platform release (
ProviderPlugin.CreateRelease) - Calls success / failure hooks (
HooksPlugin)
semrel release [flags]Examples:
# Preview what the release would dosemrel release --dry-run
# Use a non-default config locationsemrel release --config ./config/semrel.yaml
# Dry-run with a custom configsemrel release --dry-run --config ./config/semrel.yamlsemrel lint
Section titled “semrel lint”Validates commit messages since the last release against the configured rules. Useful as a pre-merge CI check.
semrel lint [flags]Examples:
# Lint commits using the default configsemrel lint
# Lint with a custom configsemrel lint --config ./config/semrel.yamlExits with code 0 if all commits are valid, 1 otherwise. CI systems can use this to block merges of non-conformant commits.