Skip to content

SemVer Check Action

Actions
Validates semver version is correct patch, minor or major increment
1.0.1
Latest
Star (0)

SemVer Check Action

This action is intended for validating version increments as part of CI. It does this by taking two version as inputs, a current_version and a branch_version and asserts that the branch_version in one major, minor or patch increment above the current_version.

Inputs

current_version

Required Version for default/integrated branch.

branch_version

Required Version for branch under CI.

Example Usage

uses: joshuamcewen/[email protected]
with:
  current-version: '0.0.1'
  branch-version: '0.0.2'

Pulling from package.json

  - name: Get main version
    run: |
      git fetch origin main:main
      echo "main_version=$(git show main:package.json | jq -r ".version")" >> "$GITHUB_ENV"

  - name: Get current branch version
    run: echo "branch_version=$(jq -r ".version" package.json)" >> "$GITHUB_ENV"

  - uses: joshuamcewen/[email protected]
    with:
      current-version: ${{ env.main_version }}
      branch-version: ${{ env.branch_version }}

SemVer Check Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Validates semver version is correct patch, minor or major increment
1.0.1
Latest

SemVer Check Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.