revam/Get tag and version
A simple action to get the last or next tag/version to use in other actions.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| static_build_number | Optional. A static build number to use with increment_by option set to "build" or "suffix". Useful if the build number is provided by the environment, e.g. GitHub Actions, etc. | no | "" |
| increment_by | Optional. Increment the version number and use the current commit details for output date and commit sha. This option will do nothing if static_version is also set. Possible values are any combination of "major", "minor", "patch", "build", "suffix" and "false" separated by a comma. Any other values will be considered as invalid, and will cause an error. If "false" is supplied in the list, then it will be considered as the option not being set. | no | false |
| incremental_tag_format | Optional. Tag format to use when incrementing the version using the increment_by option. Possible values are "full" or "short". | no | full |
| use_version | Optional. A version to use. This will skip the searching stage altogether and use the provided version with the current commit details. | no | "" |
| use_tag_ref | Optional. Use a specific tag ref, and omit the searching stage. Will throw an error if the tag ref is not found. This option will do nothing if static_version is also set. | no | "" |
| use_branch_history | Optional. Only search for for tags reachable from the current HEAD's history. This option will do nothing if static_version is also set. | no | false |
| use_semver | Optional. Use semantic versioning when comparing versions. So e.g. "1.0.0" will be greater than "1.0.0-suffix.1". This option will do nothing if static_version is also set. | no | false |
| prefix | Optional. The prefix to search for, and will be set for the new tags if increment_by is used. | no | v |
| prefix_regex | Optional. A regex sub-pattern to match multiple prefixes while looking for a match. Must also match the given prefix. | no | "" |
| suffix | Optional. An optional suffix to search for, and will be set for new tags if increment_by is used. Excluding this will omit looking for suffixes. | no | "" |
| suffix_regex | Optional. A regex sub-pattern to match multiple suffixes while looking for a match. Must also match the given suffix. | no | "" |
| fallback_version | Optional. Fallback tag/version to use when no previous tag can be found. May include a valid prefix, but may also exclude it. This option will do nothing if static_version is also set. | no | 0.0.0 |
| list_found_tags | Optional. Debug option to list out all found tags. This option will do nothing if static_version is also set. | no | false |
Outputs
| name | description |
|---|---|
| tag | Fallback tag/version to use when no previous tag can be found. May include a valid prefix, but may also exclude it. This option will do nothing if static_version is also set. |
| tag_full | The full tag with the prefix, version and suffix combined. |
| tag_short | The short-form tag with the prefix, version and suffix combined. The difference between this and tag_full is that this will collapse any 0 values in thew tag name, so v1.0.0 will be converted to v1, v1.2.0 will be converted to v1.2, and so forth. Suffix numbers are always included if a suffix is set. |
| tag_prefix | The tag prefix. |
| tag_suffix | The tag suffix. |
| commit | Full git commit hash for the selected commit details. |
| commit_short | Short-form git commit hash for the selected commit details. |
| version | The full version, with build number. |
| version_short | The version, without the build number. |
| version_major | The major version number. |
| version_minor | The minor version number. |
| version_patch | The patch version number. |
| version_build | The build version number. |
| date | An ISO 8601 format timestamp in UTC offset. |
| date_year | The year component of the date in UTC offset. |
| date_month | The month component of the date in UTC offset. |
| date_day | The day component of the date in UTC offset. |
| date_weekday | The day of the week of the date in UTC offset (e.g. Monday, Tuesday, etc.) |
| date_hours | The hour component of the time in UTC offset. |
| date_minutes | The minute component of the time in UTC offset. |
| date_seconds | The second component of the time in UTC offset. |
| date_milliseconds | The millisecond component of the time in UTC offset. |