Skip to content

Commit 2815e97

Browse files
author
Petr Sramek
committed
test composite action
1 parent 18d7a51 commit 2815e97

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

.github/workflows/dotnet.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,30 @@ jobs:
3434
name: Versioning with GitVersion ${{ vars.GIT_VERSION }}
3535
runs-on: ubuntu-latest
3636
outputs:
37-
ASSEMBLY_VERSION: ${{ steps.gitversion.outputs.assemblySemVer }}.${{ github.run_number }}
38-
ASSEMBLY_INFORMATIONAL_VERSION: ${{ steps.gitversion.outputs.assemblySemVer }}.${{ github.run_number }}+${{ steps.gitversion.outputs.sha }}
39-
FILE_VERSION: ${{ steps.gitversion.outputs.assemblySemVer }}.${{ github.run_number }}
40-
PACKAGE_VERSION: ${{ fromJSON(format('[ "{0}{1}", "{0}" ]', steps.gitversion.outputs.assemblySemVer, steps.gitversion.outputs.preReleaseLabelWithDash))[fromJSON(env.is_release)] }}
37+
ASSEMBLY_VERSION: ${{ steps.versioning.outputs.ASSEMBLY_VERSION }}
38+
ASSEMBLY_INFORMATIONAL_VERSION: ${{ steps.versioning.outputs.ASSEMBLY_INFORMATIONAL_VERSION }}
39+
FILE_VERSION: ${{ steps.versioning.outputs.FILE_VERSION }}
40+
PACKAGE_VERSION: ${{ steps.versioning.outputs.PACKAGE_VERSION }}
4141
steps:
4242
- uses: actions/checkout@v4
4343
with:
4444
fetch-depth: 0
45-
- name: Install GitVersion ${{ vars.GIT_VERSION }}
46-
uses: gittools/actions/gitversion/setup@v3.1.11
45+
- uses: ./.github/actions/versioning.yml
46+
id: versioning
4747
with:
48-
versionSpec: ${{ vars.GIT_VERSION }}
49-
preferLatestVersion: true
50-
- name: Calculate version with GitVersion ${{ vars.GIT_VERSION }}
51-
id: gitversion
52-
uses: gittools/actions/gitversion/execute@v3.1.11
53-
with:
54-
useConfigFile: true
55-
configFilePath: ./.gitversion/version.yml
48+
git-version: ${{ vars.GIT_VERSION }}
49+
is-release: ${{ env.is_release }}
50+
# - name: Install GitVersion ${{ vars.GIT_VERSION }}
51+
# uses: gittools/actions/gitversion/setup@v3.1.11
52+
# with:
53+
# versionSpec: ${{ vars.GIT_VERSION }}
54+
# preferLatestVersion: true
55+
# - name: Calculate version with GitVersion ${{ vars.GIT_VERSION }}
56+
# id: gitversion
57+
# uses: gittools/actions/gitversion/execute@v3.1.11
58+
# with:
59+
# useConfigFile: true
60+
# configFilePath: ./.gitversion/version.yml
5661

5762
build:
5863
name: Build with .NET ${{ vars.DOTNET_SDK_VERSION }}

0 commit comments

Comments
 (0)