Skip to content

The magic spell of software versions at Acto ApS

License

Notifications You must be signed in to change notification settings

actoaps/version-spell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Version spell

This action creates a version for your software, based on the checked out branch and amount of commits.

Important note

In order for this action to work, you need to checkout your code with a fetch-depth of 0. This fetches all history, which we need in order to count the commits.

Outputs

version

The version generated for your checked out commit.

Example workflow

on: [push]

jobs:
  test_action:
    runs-on: ubuntu-latest
    name: Test action
    steps:
      - name: Checkout code
        uses: actions/checkout@v3
        with:
          ref: ${{ github.head_ref }}
          fetch-depth: 0

      - name: Generate Build ID
        id: spell
        uses: actoaps/version-spell@v5

      - name: Use Build ID
        run: echo ${{ steps.spell.outputs.version }}