From a33050afb770ffeca0b1579b350e512eb87ee3c1 Mon Sep 17 00:00:00 2001 From: Bernhard Windisch Date: Mon, 29 Sep 2025 08:11:29 +0200 Subject: [PATCH] Refactor GitVersion steps in workflows to use setup action and specify version --- .github/workflows/develop-nuget-prerelease.yml | 9 ++++++--- .github/workflows/pr-validation.yml | 9 ++++++--- .github/workflows/release-stable.yml | 12 +++++++++--- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/develop-nuget-prerelease.yml b/.github/workflows/develop-nuget-prerelease.yml index 2d345cd..6ead221 100644 --- a/.github/workflows/develop-nuget-prerelease.yml +++ b/.github/workflows/develop-nuget-prerelease.yml @@ -27,11 +27,14 @@ jobs: with: dotnet-version: 9.0.x - - name: GitVersion - uses: GitTools/actions/gitversion/execute@v3 + - name: Install GitVersion + uses: gittools/actions/gitversion/setup@v3 with: - useConfigFile: true + versionSpec: '6.x' + + - name: Calculate version id: gv + uses: gittools/actions/gitversion/execute@v3 - name: Log calculated version run: echo "GitVersion calculated prerelease version ${{ steps.gv.outputs.SemVer }}" diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index c29e8d0..481c267 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -21,11 +21,14 @@ jobs: with: dotnet-version: 9.0.x - - name: GitVersion - uses: GitTools/actions/gitversion/execute@v3 + - name: Install GitVersion + uses: gittools/actions/gitversion/setup@v3 with: - useConfigFile: true + versionSpec: '6.x' + + - name: Calculate version id: gv + uses: gittools/actions/gitversion/execute@v3 - name: Log calculated version run: echo "GitVersion calculated version ${{ steps.gv.outputs.SemVer }}" diff --git a/.github/workflows/release-stable.yml b/.github/workflows/release-stable.yml index a6230d9..9af70f6 100644 --- a/.github/workflows/release-stable.yml +++ b/.github/workflows/release-stable.yml @@ -31,11 +31,17 @@ jobs: with: dotnet-version: 9.0.x - - name: GitVersion - uses: GitTools/actions/gitversion/execute@v3 + - name: Install GitVersion + uses: gittools/actions/gitversion/setup@v3 with: - useConfigFile: true + versionSpec: '6.x' + + - name: Calculate version id: gv + uses: gittools/actions/gitversion/execute@v3 + + - name: Log calculated version + run: echo "GitVersion calculated version ${{ steps.gv.outputs.SemVer }}" - name: Verify tag matches GitVersion run: |