Skip to content

ShubhamYadav25/validate-semver

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SemVer Validator GitHub Action

A Clean, Responsive Tool to Validate Semantic Versioning Strings

GitHub Marketplace

Validate whether a given version string follows Semantic Versioning 2.0.0 format. Lightweight and dependency-free!

🚀 Features

  • ✅ Validates SemVer 2.0.0 strings
  • 🔒 Zero dependencies
  • ⚡ Fast, pure JavaScript implementation
  • 🎯 Fails workflow if version is invalid

📦 Installation

You can use this GitHub Action in any workflow by referencing it like this:

📥 Inputs

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'

🧪 Example Usage

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'

🖥️ UI: Try SemVer Validation in Browser

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

🧑‍💻 Contributing

Feel free to open issues or pull requests! The validator logic is implemented in pure JavaScript in SemVerValidator.js

🌐 Live Demo

Check out the interactive demo of this tool at 🔗 semver-validator.onrender.com

About

A Clean, Responsive Tool to Validate Semantic Versioning Strings

Resources

Stars

Watchers

Forks

Packages

No packages published