actions-marketplace-validations/Version Extractor
Extract and parse a semantic version from a tag, ref, or manual input.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| tag | Tag to extract version from (e.g. v1.3.0). Takes priority over fallback-ref. | no | "" |
| fallback-ref | Fallback ref name when tag is empty | no | ${{ github.ref_name }} |
| prefix | Version prefix to strip (e.g. v) | no | v |
| strict | Whether to strictly validate semver format | no | true |
| extract-pattern | Regex to extract version from raw input (first capture group is used if present) | no | "" |
| fail-on-error | Whether to fail the action when version extraction fails | no | true |
Outputs
| name | description |
|---|---|
| found | Whether a valid version was found (true/false) |
| source | The raw input string before any processing |
| version | Full version string with prefix (e.g. v1.3.0) |
| version-number | Version string without prefix (e.g. 1.3.0) |
| major | Major version number |
| minor | Minor version number |
| patch | Patch version number |
| prerelease | Prerelease identifier (if any) |
| is-prerelease | Whether the version is a prerelease (true/false) |