File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7272 - name : Determine Version
7373 id : gitversion
7474 uses : gittools/actions/gitversion/execute@v0.10.2
75+ with :
76+ useConfigFile : true
77+ configFilePath : GitVersion.yml
78+
79+ - name : Display Version
80+ run : |
81+ echo "Major: ${{ steps.gitversion.outputs.major }}"
82+ echo "Minor: ${{ steps.gitversion.outputs.minor }}"
83+ echo "Patch: ${{ steps.gitversion.outputs.patch }}"
84+ echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}"
85+ echo "SemVer: ${{ steps.gitversion.outputs.semVer }}"
86+ echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}"
87+ echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}"
88+ echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.commitsSinceVersionSource }}"
7589
7690 - name : Setup .NET
7791 uses : actions/setup-dotnet@v4
@@ -82,10 +96,10 @@ jobs:
8296 run : dotnet restore ${{ env.PROJECT_PATH }}
8397
8498 - name : Build
85- run : dotnet build ${{ env.PROJECT_PATH }} --no-restore --configuration Release -p:Version=${{ steps.gitversion.outputs.MajorMinorPatch }}
99+ run : dotnet build ${{ env.PROJECT_PATH }} --no-restore --configuration Release -p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }}
86100
87101 - name : Pack
88- run : dotnet pack ${{ env.PROJECT_PATH }} --no-build --configuration Release -p:PackageVersion=${{ steps.gitversion.outputs.MajorMinorPatch }} --output ./nupkg
102+ run : dotnet pack ${{ env.PROJECT_PATH }} --no-build --configuration Release -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} --output ./nupkg
89103
90104 - name : Publish to NuGet
91105 env :
Original file line number Diff line number Diff line change 1+ mode : ContinuousDeployment
2+ branches :
3+ main :
4+ regex : ^main$
5+ mode : ContinuousDeployment
6+ tag : ' '
7+ increment : Patch
8+ prevent-increment-of-merged-branch-version : true
9+ track-merge-target : false
10+ source-branches : []
11+ is-release-branch : true
12+ develop :
13+ regex : ^develop$
14+ mode : ContinuousDeployment
15+ tag : alpha
16+ increment : Minor
17+ prevent-increment-of-merged-branch-version : false
18+ track-merge-target : true
19+ source-branches : []
20+ feature :
21+ regex : ^features?[/-]
22+ mode : ContinuousDeployment
23+ tag : useBranchName
24+ increment : Inherit
25+ source-branches : ['develop', 'main']
You can’t perform that action at this time.
0 commit comments