You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
semver-utils
1.0.0
One-stop shop for working with semantic versions in your GitHub Actions workflows.
- uses: madhead/semver-utils@latest
id: version
with:
# A version to work with
version: 1.2.3
# A version to compare against
compare-to: 2.1.0
- run: |
echo "${{ steps.version.outputs.major }}" # 1
echo "${{ steps.version.outputs.minor }}" # 2
echo "${{ steps.version.outputs.patch }}" # 3
echo "${{ steps.version.outputs.comparison-result }}" # <
If any of the inputs (version
or compare-to
) cannot be parsed, it is just silently ignored. This action tries its best not to fail.