This action extracts the current version from the branch name/git tag. If a version name is not provided
it falls back to the given main_version number.
| name | description |
|---|---|
| version | The extracted version number |
on: [push]jobs:
build:
runs-on: ubuntu-latestname: Build with a specific version numbersteps:
- name: Extract versionid: versionuses: digizuite/git-extract-versionwith:
main_version: '6.6.6'# Version to use if version cannot be extracted from branch name
- name: Get the output versionrun: echo "The version is ${{ steps.version.outputs.version }}"