Skip to content

Commit f61bf17

Browse files
committed
GitVersion 6 removed NuGetVersion
1 parent 5a27ea4 commit f61bf17

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

.github/workflows/_build-test.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
SOLUTION_FILE: 'source/${{ inputs.project-name }}.sln'
3131

3232
outputs:
33-
version: ${{ steps.gitversion.outputs.nuGetVersion }}
33+
version: ${{ steps.gitversion.outputs.semVer }}
3434

3535
steps:
3636
# https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches
@@ -39,14 +39,14 @@ jobs:
3939
with:
4040
fetch-depth: 0
4141

42-
# https://github.com/GitTools/actions/blob/main/docs/examples/github/gitversion/setup/usage-examples.md#example-1
42+
# https://github.com/GitTools/actions/blob/main/docs/examples/github/gitversion/setup.md#example-1
4343
- name: Set up GitVersion
4444
if: ${{ inputs.environment == 'release' }}
4545
uses: gittools/actions/gitversion/[email protected]
4646
with:
47-
versionSpec: '6.x'
47+
versionSpec: '6.0.x'
4848

49-
# https://github.com/GitTools/actions/blob/main/docs/examples/github/gitversion/execute/usage-examples.md#example-5
49+
# https://github.com/GitTools/actions/blob/main/docs/examples/github/gitversion/execute.md#example-1
5050
# For a list of all GitVersion Version Variables, see https://gitversion.net/docs/reference/variables
5151
- name: Use GitVersion to determine version
5252
if: ${{ inputs.environment == 'release' }}
@@ -82,7 +82,7 @@ jobs:
8282

8383
- name: Build all projects in the solution
8484
run: dotnet build $SOLUTION_FILE --configuration $CONFIGURATION --no-restore
85-
85+
8686
# The xUnit test project template already integrates with coverlet.collector by default
8787
# Don't use the '--logger trx' option as it causes duplicate folders and xml files to be created
8888
- name: Test all projects in the solution
@@ -137,13 +137,13 @@ jobs:
137137
# Use either GeneratePackageOnBuild or dotnet pack, not both. See https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-pack
138138
- name: Create NuGet package
139139
if: ${{ inputs.environment == 'release' }}
140-
run: dotnet pack $SOLUTION_FILE -c $CONFIGURATION -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersion }} --output './artifacts/' --no-build
140+
run: dotnet pack $SOLUTION_FILE -c $CONFIGURATION -p:PackageVersion=${{ steps.gitversion.outputs.semVer }} --output './artifacts/' --no-build
141141

142142
- name: Markdown workflow job summary
143143
if: ${{ inputs.environment == 'release' }}
144144
run: echo '### Packed ${{ env.Package_Names }}' >> $GITHUB_STEP_SUMMARY
145145
env:
146-
Package_Names: '${{ inputs.project-name }}.*.${{ steps.gitversion.outputs.nuGetVersion }}.nupkg'
146+
Package_Names: '${{ inputs.project-name }}.*.${{ steps.gitversion.outputs.semVer }}.nupkg'
147147

148148
# https://github.com/actions/upload-artifact
149149
- name: Upload artifacts for deployment job

.github/workflows/_build.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
2323
SOURCE: "source"
2424
SENDER: "${{ inputs.project-name }}.Sender"
2525
RECEIVER: "${{ inputs.project-name }}.Receiver"
26-
NET_VERSION: '8.x'
2726

2827
outputs:
2928
artifact: ${{ env.SOURCE }} # -${{ matrix.runs-on }}
@@ -33,7 +32,7 @@ jobs:
3332
uses: actions/checkout@v4
3433

3534
# https://github.com/actions/setup-dotnet
36-
- name: Get .NET ${{ env.NET_VERSION }} externals
35+
- name: Get .NET externals
3736
uses: actions/setup-dotnet@v4
3837
with:
3938
dotnet-version: |

0 commit comments

Comments
 (0)