This is a GitHub workflow which calculates the commit version based on Git history.
See OpenTAP docs for details about the format.
To use in your workflow, add this job:
jobs:
GetVersion:
runs-on: ubuntu-20.04
outputs:
ShortVersion: ${{ steps.gitversion.outputs.ShortVersion }}
LongVersion: ${{ steps.gitversion.outputs.LongVersion }}
GitVersion: ${{ steps.gitversion.outputs.GitVersion }}
steps:
- name: GitVersion
id: gitversion
uses: opentap/get-gitversion@v1.0You can then use the version in a job like this:
jobs:
...
Package:
needs:
- GetVersion
steps:
...
- run: tap package create package.xml -o ./MyPlugin.${{needs.GetVersion.outputs.GitVersion}}.TapPackage