GithubHelp home page GithubHelp logo

equinor / avert-get-version-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bjartebore/get-version-action

0.0 1.0 0.0 1.99 MB

A GitHub Action which extracts the version from github.ref

License: MIT License

JavaScript 100.00%

avert-get-version-action's Introduction

Get Version Action

A GitHub Action which extracts the version from github.ref.

Finally, you can reliably get the pushed version on every platform. Now includes support for semver!

Outputs

version

The pushed version. If github.ref was refs/tags/v1.2.7 or refs/heads/release/v1.2.7 then the value of this output will be v1.2.7.

version-without-v

The pushed version with the leading v stripped. If github.ref was refs/tags/v1.2.7 then the value of this output will be 1.2.7.

If the version does not start with a leading v character, then the value of this output is the same as that of version.

is-semver

Set to true if the pushed version is a valid semver value. If it's not, then this output will not be set.

major

The semver major version, for example 1 in the case of v1.2.3-ALPHA.0+BUILD.1.

minor

The semver minor version, for example 2 in the case of v1.2.3-ALPHA.0+BUILD.1.

patch

The semver patch version, for example 3 in the case of v1.2.3-ALPHA.0+BUILD.1.

prerelease

The semver prerelease version, for example ALPHA.0 in the case of v1.2.3-ALPHA.0+BUILD.1.

build

The semver build version, for example BUILD.1 in the case of v1.2.3-ALPHA.0+BUILD.1.

Example usage

steps:
    - id: get_version
      uses: battila7/get-version-action@v2

    - run: echo ${{ steps.get_version.outputs.version }}

    - run: echo ${{ steps.get_version.outputs.version-without-v }}

avert-get-version-action's People

Contributors

battila7 avatar bjartebore avatar dependabot[bot] avatar rsbh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.