gandarez/semver-action
Generate a semantic version based on branch name
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| bump | Bump strategy for semantic versioning. Can be `auto`, `major`, `minor`, `patch`. Defaults to `auto` | no | auto |
| branching_model | Branching model. Can be `git-flow` or `trunk-based`. Defaults to `git-flow` | no | git-flow |
| patch_regex | Patch regex to match branch name for patch increment. Defaults to `(?i)^(.+:)?(bugfix/.+)` | no | (?i)^(.+:)?(bugfix/.+) |
| minor_regex | Feature regex to match branch name for minor increment. Defaults to `(?i)^(.+:)?(feature/.+)` | no | (?i)^(.+:)?(feature/.+) |
| major_regex | Major regex to match branch name for major increment. Defaults to `(?i)^(.+:)?(release/.+)` | no | (?i)^(.+:)?(release/.+) |
| build_regex | Build regex to match branch name for build increment. Defaults to `(?i)^(.+:)?((doc(s)?|misc)/.+)` | no | (?i)^(.+:)?((doc(s)?|misc)/.+) |
| hotfix_regex | Hotfix regex to match branch name for patch increment. Defaults to `(?i)^(.+:)?(hotfix/.+)` | no | (?i)^(.+:)?(hotfix/.+) |
| exclude_regex | Regex to exclude branches from semantic versioning | no | "" |
| include_tag_pattern | Glob pattern to include tags when looking up the latest tag (passed to git --match/--list). Defaults to empty (no filter) | no | "" |
| exclude_tag_pattern | Glob pattern to exclude tags when looking up the latest tag (passed to git --exclude). Defaults to empty (no filter) | no | "" |
| base_version | Version to use as base for the generation, skips version bumps | no | — |
| prefix | Prefix used to prepend the calculated semantic version. Defaults to `v` | no | v |
| prerelease_id | Text representing the pre-release identifier. Defaults to `pre` | no | pre |
| main_branch_name | The main branch name. Defaults to `master` | no | master |
| develop_branch_name | The develop branch name. In trunk-based model this is ignored. Defaults to `develop` | no | develop |
| repo_dir | The repository path. Defaults to current directory | no | . |
| debug | Enable debug mode. Defaults to `false` | no | false |
Outputs
| name | description |
|---|---|
| semver_tag | The calculdated semantic version |
| is_prerelease | True if calculated semantic version is pre-release. For trunk-based model it is always `false` |
| previous_tag | The tag used to calculate next semantic version |
| ancestor_tag | The ancestor tag based on specific pattern. For trunk-based model it is always empty |