Skip to content

tobias-graf-p/action-minver

 
 

Repository files navigation

MinVer for GitHub Actions

Build status

This repository contains a GitHub Action to run MinVer. This is intended to be used for projects written in languages other than dotnet. See https://github.com/adamralph/minver/#usage for more information about MinVer.

Configuration

- uses: thefringeninja/action-minver
  with:
    # Optional. Specifies which part of the version to auto-increment.
    auto-increment: patch
    # Optional. Sets custom build metadata for your semantic version.
    build-metadata: ${{ github.sha }}
    # Optional. Specifies the default pre-release phase.
    default-pre-release-phase: preview
    # Optional. Specifies the minimum version to use when no tags exist.
    minimum-major-minor: 2.0.0
    # Optional. Specifies the prefix of the tags
    tag-prefix: v
    # Optional. Specifies the log level.
    verbosity: trace

Outputs

  • version

Prerequisites

You must run the following actions first:

  • actions/checkout: in addition, set fetch-depth to 0 to fetch the entire repository, including tags. Without this, the correct version may not get calculated.

Example

name: Build

on:
  pull_request:
  push:
    branches:
    - master

jobs:
  continuous-integration:
    runs-on: ubuntu-latest
    steps:
    - name: checkout
      uses: actions/checkout@master
      with:
        fetch-depth: 0
    - name: run minver
      id: version
      uses: thefringeninja/action-minver
    - name: output
      run: |
        echo ${{ steps.version.outputs.version }}

Please pay special attention to the step id; without this you will not be able to refer to outputs in subsequent steps.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 87.1%
  • Dockerfile 5.5%
  • JavaScript 5.4%
  • Shell 2.0%