File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 12
12
version :
13
13
name : Version with GitVersion ${{ vars.GIT_VERSION }}
14
14
runs-on : ubuntu-latest
15
+ outputs :
16
+ SemVer : ${{ steps.gitversion.outputs.fullSemVer }}
15
17
steps :
16
18
- uses : actions/checkout@v3
17
19
with :
@@ -21,26 +23,28 @@ jobs:
21
23
with :
22
24
versionSpec : ${{ vars.GIT_VERSION }}
23
25
preferLatestVersion : true
24
- - name : Update Version with GitVersion ${{ vars.GIT_VERSION }}
26
+ - name : Calculate version with GitVersion ${{ vars.GIT_VERSION }}
27
+ id : gitversion
25
28
uses : gittools/actions/gitversion/execute@v3.1.11
26
29
with :
27
30
useConfigFile : true
28
31
configFilePath : ./.gitversion/version.yml
29
- updateAssemblyInfo : true
30
32
- run : ' echo FullSemVer: ${{ env.fullSemVer }}'
31
33
32
34
build :
33
35
name : Build with .NET ${{ vars.DOTNET_VERSION }}
34
36
needs : [version]
35
37
runs-on : ubuntu-latest
38
+ env :
39
+ semver : ${{ needs.version.outputs.SemVer }}
36
40
steps :
37
41
- uses : actions/checkout@v3
38
42
- name : Install .NET ${{ vars.DOTNET_VERSION }}
39
43
uses : actions/setup-dotnet@v4
40
44
with :
41
45
dotnet-version : ${{ vars.DOTNET_VERSION }}
42
46
- name : Build with .NET ${{ vars.DOTNET_VERSION }}
43
- run : dotnet build ./src/**/*.csproj --configuration ${{ vars.BUILD_CONFIGURATION }} /p:Platform=${{ vars.BUILD_PLATFORM }}
47
+ run : dotnet build ./src/**/*.csproj --configuration ${{ vars.BUILD_CONFIGURATION }} /p:Platform=${{ vars.BUILD_PLATFORM }} -p:Version=$env:semver -p:FileVersion=$env:semver
44
48
- name : Upload Build
45
49
uses : actions/upload-artifact@v4
46
50
with :
You can’t perform that action at this time.
0 commit comments