Skip to content
hash

GitHub Action

Version code generator

3.9.4 Latest version

Version code generator

hash

Version code generator

Generates version codes based on commit count

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Version code generator

uses: lucasfe/version_code_generator@3.9.4

Learn more about this action in lucasfe/version_code_generator

Choose a version

Version code generator action

Build Status Stable Version Latest Release

This action generates a version code based on the commit count of your current branch

Inputs

offset

Required The to be increased on decreased for the final version code. Default "0".

Outputs

code

The version code generated.

Usage

name: Version code generator

When using action checkout please specify the input parameter fetch-depth: 0 in order to retrieve all commits

on: [push]

jobs:
  hello_world_job:
    runs-on: ubuntu-latest
    name: Generate new version code
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
- name: Get version code
  id: version_code
  uses: lucasfe/version_code_generator@v1.0.0
  with:
    offset: '-3'