30
30
SOLUTION_FILE : ' source/${{ inputs.project-name }}.sln'
31
31
32
32
outputs :
33
- version : ${{ steps.gitversion.outputs.nuGetVersion }}
33
+ version : ${{ steps.gitversion.outputs.semVer }}
34
34
35
35
steps :
36
36
# https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches
@@ -39,14 +39,14 @@ jobs:
39
39
with :
40
40
fetch-depth : 0
41
41
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
43
43
- name : Set up GitVersion
44
44
if : ${{ inputs.environment == 'release' }}
45
45
uses :
gittools/actions/gitversion/[email protected]
46
46
with :
47
- versionSpec : ' 6.x'
47
+ versionSpec : ' 6.0. x'
48
48
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
50
50
# For a list of all GitVersion Version Variables, see https://gitversion.net/docs/reference/variables
51
51
- name : Use GitVersion to determine version
52
52
if : ${{ inputs.environment == 'release' }}
82
82
83
83
- name : Build all projects in the solution
84
84
run : dotnet build $SOLUTION_FILE --configuration $CONFIGURATION --no-restore
85
-
85
+
86
86
# The xUnit test project template already integrates with coverlet.collector by default
87
87
# Don't use the '--logger trx' option as it causes duplicate folders and xml files to be created
88
88
- name : Test all projects in the solution
@@ -133,17 +133,17 @@ jobs:
133
133
cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
134
134
env :
135
135
title : ' ${{ inputs.project-name }} Code Coverage Results'
136
-
136
+
137
137
# Use either GeneratePackageOnBuild or dotnet pack, not both. See https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-pack
138
138
- name : Create NuGet package
139
139
if : ${{ inputs.environment == 'release' }}
140
- run : dotnet pack $SOLUTION_FILE -c $CONFIGURATION -p:PackageVersion =${{ steps.gitversion.outputs.nuGetVersion }} --output './artifacts/' --no-build
141
-
140
+ run : dotnet pack $SOLUTION_FILE -c $CONFIGURATION -p:Version =${{ steps.gitversion.outputs.semVer }} --output './artifacts/' --no-build
141
+
142
142
- name : Markdown workflow job summary
143
143
if : ${{ inputs.environment == 'release' }}
144
144
run : echo '### Packed ${{ env.Package_Names }}' >> $GITHUB_STEP_SUMMARY
145
145
env :
146
- Package_Names : ' ${{ inputs.project-name }}.*.${{ steps.gitversion.outputs.nuGetVersion }}.nupkg'
146
+ Package_Names : ' ${{ inputs.project-name }}.*.${{ steps.gitversion.outputs.semVer }}.nupkg'
147
147
148
148
# https://github.com/actions/upload-artifact
149
149
- name : Upload artifacts for deployment job
0 commit comments