Inputs
This action takes a single input, string, described below.
string
The string to split into semantic version numbers.
Examples
Some acceptable inputs might be:
v1.2.3version 123.456.789-beta.1garas 6.7.79+auto
Outputs
The value of the string input is matched against the following regular expression:
(((([0-9]+)[.]([0-9]+))[.]([0-9]+))(-([a-zA-Z0-9.]+))?)(\+([a-zA-Z0-9.]+))?
Captured groups become this Action's outputs, described below; anything that is not matched is ignored.
Tip
If you are making use of this Action, do not expect to use all outputs; most likely, you will need only one or a few of them.
full
The semantic version detected in string with all its components, however excluding any external data.
Corresponding to match 0 of the regular expression.
Examples
Given the input examples, corresponding outputs will be:
1.2.3- `123.456.789-beta.1
6.7.79+auto
precedence
The semantic version detected in string, but with metadata excluded.
Corresponding to match 1 of the regular expression.
Examples
Given the input examples, corresponding outputs will be:
1.2.3123.456.789-beta.16.7.79
core
The semantic version detected in string, but with metadata and pre-release version excluded.
Corresponding to match 2 of the regular expression.
Examples
Given the input examples, corresponding outputs will be:
1.2.3123.456.7896.7.79
pair
The semantic version detected in string, but including only major and minor version, excluding anything from patch level and below.
Corresponding to match 3 of the regular expression.
Examples
Given the input examples, corresponding outputs will be:
1.2123.4566.7
major
The major version detected in string.
Corresponding to match 4 of the regular expression.
Examples
Given the input examples, corresponding outputs will be:
11236
minor
Only the minor version detected in string.
Corresponding to match 5 of the regular expression.
Examples
Given the input examples, corresponding outputs will be:
24567
patch
Only the patch version detected in string.
Corresponding to match 6 of the regular expression.
Examples
Given the input examples, corresponding outputs will be:
378979
prerelease
Only the prerelease version detected in string.
Corresponding to match 8 of the regular expression.
Examples
Given the input examples, corresponding outputs will be:
- empty string
beta.1- empty string
metadata
Only the metadata detected in string.
Corresponding to match 10 of the regular expression.
Examples
Given the input examples, corresponding outputs will be:
- empty string
- empty string
auto