Skip to content

Very simple GitHub Action that normalizes given version

License

Notifications You must be signed in to change notification settings

cdqag/normalize-version

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

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

normalize-version

This is very simple GitHub Action that normalizes given version.

  • It makes sure that given version is always prefixed with v.
  • It extracts the major version from the given version, and also makes sure that it is prefixed with v.

Inputs

  • version Required

    The version to normalize.

Outputs

  • semver

    The normalized semver version.

  • major

    The major version.

Example usage

name: Release

on:
  workflow_dispatch:
    inputs:
      version:
        description: 'Version to release'
        required: true

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
    - id: version
      uses: cdqag/normalize-version@v1
      with:
        version: ${{ inputs.version }}

    - name: Release
      run: |
        echo "Releasing version ${{ steps.version.outputs.semver }} to branch ${{ steps.version.outputs.major }}"

License

This project is licensed under the Apache-2.0 License. See the LICENSE file for details.

About

Very simple GitHub Action that normalizes given version

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •