-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitversion.yml
35 lines (32 loc) · 1.16 KB
/
gitversion.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# This example should be copied into your main .yml workflow and not imported.
# It lacks the relevant input/output features to work effectively.
# Contributions to make this an importable workflow is welcome.
# This action will generate a git version number that can be used by your actions
# More on gitversion and its importance can be found here https://gitversion.net/docs/
# Example of usage:
# print-git-version:
# name: GitVersion - ${{ needs.version.outputs.git-version }}
# runs-on: ubuntu-latest
# needs: [version]
# steps:
# - run: echo ${{ needs.version.outputs.git-version }}
version:
name: Version Number
runs-on: windows-latest
outputs:
git-version: ${{ steps.gitversion.outputs.nuGetVersionV2 }}
major-minor-patch: ${{ steps.gitversion.outputs.majorMinorPatch }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: "5.5.0"
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true