revam/Get tag and version

A simple action to get the last or next tag/version to use in other actions.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
static_build_numberOptional. 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_byOptional. 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.nofalse
incremental_tag_formatOptional. Tag format to use when incrementing the version using the increment_by option. Possible values are "full" or "short".nofull
use_versionOptional. A version to use. This will skip the searching stage altogether and use the provided version with the current commit details.no""
use_tag_refOptional. 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_historyOptional. Only search for for tags reachable from the current HEAD's history. This option will do nothing if static_version is also set.nofalse
use_semverOptional. 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.nofalse
prefixOptional. The prefix to search for, and will be set for the new tags if increment_by is used.nov
prefix_regexOptional. A regex sub-pattern to match multiple prefixes while looking for a match. Must also match the given prefix.no""
suffixOptional. 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_regexOptional. A regex sub-pattern to match multiple suffixes while looking for a match. Must also match the given suffix.no""
fallback_versionOptional. 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.no0.0.0
list_found_tagsOptional. Debug option to list out all found tags. This option will do nothing if static_version is also set.nofalse
namedescription
tagFallback 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_fullThe full tag with the prefix, version and suffix combined.
tag_shortThe 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_prefixThe tag prefix.
tag_suffixThe tag suffix.
commitFull git commit hash for the selected commit details.
commit_shortShort-form git commit hash for the selected commit details.
versionThe full version, with build number.
version_shortThe version, without the build number.
version_majorThe major version number.
version_minorThe minor version number.
version_patchThe patch version number.
version_buildThe build version number.
dateAn ISO 8601 format timestamp in UTC offset.
date_yearThe year component of the date in UTC offset.
date_monthThe month component of the date in UTC offset.
date_dayThe day component of the date in UTC offset.
date_weekdayThe day of the week of the date in UTC offset (e.g. Monday, Tuesday, etc.)
date_hoursThe hour component of the time in UTC offset.
date_minutesThe minute component of the time in UTC offset.
date_secondsThe second component of the time in UTC offset.
date_millisecondsThe millisecond component of the time in UTC offset.