A Clean, Responsive Tool to Validate Semantic Versioning Strings
Validate whether a given version string follows Semantic Versioning 2.0.0 format. Lightweight and dependency-free!
- ✅ Validates SemVer 2.0.0 strings
- 🔒 Zero dependencies
- ⚡ Fast, pure JavaScript implementation
- 🎯 Fails workflow if version is invalid
You can use this GitHub Action in any workflow by referencing it like this:
This action accepts the following input:
Name | Description |
---|---|
version |
✅ A string that should comply with Semantic Versioning 2.0.0. If the version is valid, the workflow continues. Otherwise, it fails immediately. |
- uses: ShubhamYadav25/validate-semver@v1.0.0
with:
version: '1.2.3-alpha+build.456'
name: Validate SemVer on Push
on:
push:
branches: [main]
workflow_dispatch:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Validate SemVer string
uses: ShubhamYadav25/validate-semver@v1.0.0
with:
version: 'version'
Want to manually check your version string before running the action?
🔗 Check out the interactive demo of this tool at:
🌐 https://semver-validator.onrender.com
Feel free to open issues or pull requests! The validator logic is implemented in pure JavaScript in SemVerValidator.js
Check out the interactive demo of this tool at 🔗 semver-validator.onrender.com