actions-marketplace-validations/semver-utils
One-stop shop for working with semantic versions in your workflows
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| version | A version to process | yes | — |
| compare-to | A version to compare with, if any | no | — |
| diff-with | A version to diff with. If not specified, the version will be diffed with the `compare-to` input. If `compare-to` is not specified either, nothing happens. | no | — |
| satisfies | A range to check against | no | — |
| identifier | An identifier to pass to the semver's inc function | no | — |
| lenient | Do not fail on incorrect input | no | true |
Outputs
| name | description |
|---|---|
| release | Version's release (major.minor.patch) |
| major | Version's major number |
| minor | Version's minor number |
| patch | Version's patch number |
| build | Version's build |
| build-parts | Number of components in version's build. Individual сomponents are returned as `build-N` outputs, where an is an index from zero to `build-parts` - 1. |
| prerelease | Version's pre-release |
| prerelease-parts | Number of components in version's pre-release. Individual сomponents are returned as `prerelease-N` outputs, where an is an index from zero to `prerelease-parts` - 1. |
| comparison-result | If the compare-to was provided, this output will contain "<" if comes after the version, ">" if it preceeds it, and "=" if they are equal |
| diff-result | If the diff-to or compare-to were provided, this output will contain the diff result |
| satisfies | true if the version satisfies the given range |
| inc-major | A result of the call of the semver's `inc` function with `major` increment |
| inc-premajor | A result of the call of the semver's `inc` function with `premajor` increment |
| inc-minor | A result of the call of the semver's `inc` function with `minor` increment |
| inc-preminor | A result of the call of the semver's `inc` function with `preminor` increment |
| inc-patch | A result of the call of the semver's `inc` function with `patch` increment |
| inc-prepatch | A result of the call of the semver's `inc` function with `prepatch` increment |
| inc-prerelease | A result of the call of the semver's `inc` function with `prerelease` increment |