Skip to content

Commit ff65c69

Browse files
author
Petr Sramek
committed
added versioning yml
1 parent b5a7580 commit ff65c69

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

.github/actions/versioning.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: 'Hello World'
2+
description: 'Greet someone'
3+
inputs:
4+
git-version: # id of input
5+
description: 'Version of GitVersion'
6+
required: true
7+
default: 6.0.x
8+
git-action-version: # id of input
9+
description: 'Version of GitVersion actions'
10+
required: true
11+
default: v3.1.11
12+
is-release:
13+
description: 'Realese flag'
14+
required: false
15+
default: false
16+
outputs:
17+
ASSEMBLY_VERSION: ${{ steps.gitversion.outputs.assemblySemVer }}.${{ github.run_number }}
18+
ASSEMBLY_INFORMATIONAL_VERSION: ${{ steps.gitversion.outputs.assemblySemVer }}.${{ github.run_number }}+${{ steps.gitversion.outputs.sha }}
19+
FILE_VERSION: ${{ steps.gitversion.outputs.assemblySemVer }}.${{ github.run_number }}
20+
PACKAGE_VERSION: ${{ fromJSON(format('[ "{0}.{1}.{2}", "{0}.{2}" ]', steps.gitversion.outputs.assemblySemVer, steps.gitversion.outputs.preReleaseLabelWithDash, github.run_number))[fromJSON($INPUT_IS_RELEASE)] }}
21+
runs:
22+
using: "composite"
23+
steps:
24+
steps:
25+
- uses: actions/checkout@v3
26+
with:
27+
fetch-depth: 0
28+
- name: Install GitVersion $INPUT_GIT_VERSION
29+
uses: gittools/actions/gitversion/setup@$INPUT_GIT_ACTION_VERSION
30+
with:
31+
versionSpec: $INPUT_GIT_VERSION
32+
preferLatestVersion: true
33+
- name: Calculate version with GitVersion $INPUT_GIT_VERSION
34+
id: gitversion
35+
uses: gittools/actions/gitversion/execute@$INPUT_GIT_ACTION_VERSION
36+
with:
37+
useConfigFile: true
38+
configFilePath: ./.gitversion/version.yml
39+

.github/workflows/dotnet.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ jobs:
3535
- uses: actions/checkout@v3
3636
with:
3737
fetch-depth: 0
38-
- run: 'echo ${{ github.ref_name }}'
3938
- name: Install GitVersion ${{ vars.GIT_VERSION }}
4039
uses: gittools/actions/gitversion/setup@v3.1.11
4140
with:

0 commit comments

Comments
 (0)