Skip to content

Commit c4fc590

Browse files
author
Petr Sramek
committed
test custom action
1 parent ff65c69 commit c4fc590

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

.github/actions/versioning.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: 'Hello World'
2-
description: 'Greet someone'
1+
name: 'Versioning with GitVersion $INPUT_GIT_VERSION'
2+
description: 'Generating software versions'
33
inputs:
44
git-version: # id of input
55
description: 'Version of GitVersion'

.github/workflows/dotnet.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,18 @@ jobs:
2727
name: Versioning with GitVersion ${{ vars.GIT_VERSION }}
2828
runs-on: ubuntu-latest
2929
outputs:
30-
ASSEMBLY_VERSION: ${{ steps.gitversion.outputs.assemblySemVer }}.${{ github.run_number }}
31-
ASSEMBLY_INFORMATIONAL_VERSION: ${{ steps.gitversion.outputs.assemblySemVer }}.${{ github.run_number }}+${{ steps.gitversion.outputs.sha }}
32-
FILE_VERSION: ${{ steps.gitversion.outputs.assemblySemVer }}.${{ github.run_number }}
33-
PACKAGE_VERSION: ${{ fromJSON(format('[ "{0}.{1}.{2}", "{0}.{2}" ]', steps.gitversion.outputs.assemblySemVer, steps.gitversion.outputs.preReleaseLabelWithDash, github.run_number))[fromJSON(env.is_release)] }}
30+
ASSEMBLY_VERSION: ${{ steps.gitversion.outputs.ASSEMBLY_VERSION }}
31+
ASSEMBLY_INFORMATIONAL_VERSION: ${{ steps.gitversion.outputs.ASSEMBLY_INFORMATIONAL_VERSION }}
32+
FILE_VERSION: ${{ steps.gitversion.outputs.FILE_VERSION }}
33+
PACKAGE_VERSION: ${{ steps.gitversion.outputs.PACKAGE_VERSION }}
3434
steps:
3535
- uses: actions/checkout@v3
3636
with:
3737
fetch-depth: 0
38-
- name: Install GitVersion ${{ vars.GIT_VERSION }}
39-
uses: gittools/actions/gitversion/setup@v3.1.11
40-
with:
41-
versionSpec: ${{ vars.GIT_VERSION }}
42-
preferLatestVersion: true
43-
- name: Calculate version with GitVersion ${{ vars.GIT_VERSION }}
38+
- uses: petesramek/.github/action/verssioning.yml@ff65c698fe9cafaf33325a22bdad3d4b0c0f4100
4439
id: gitversion
45-
uses: gittools/actions/gitversion/execute@v3.1.11
4640
with:
47-
useConfigFile: true
48-
configFilePath: ./.gitversion/version.yml
41+
is-release: ${{ env.is_release }}
4942

5043
build:
5144
name: Build with .NET ${{ vars.DOTNET_SDK_VERSION }}

0 commit comments

Comments
 (0)