Skip to content

Commit 5a35348

Browse files
committed
Add gitversion to build script
1 parent f6815e3 commit 5a35348

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,17 @@ jobs:
2525
- name: Install .NET Workloads
2626
run: dotnet workload install ios maccatalyst
2727

28+
- name: Determine Version
29+
id: gitversion
30+
uses: gittools/actions/gitversion/execute@v0.9.7
31+
with:
32+
useConfigFile: true
33+
2834
- name: Restore dependencies
2935
run: dotnet restore
3036

3137
- name: Build
32-
run: dotnet build Cirrious.FluentLayout/Cirrious.FluentLayouts.Touch.csproj --no-restore
38+
run: dotnet build Cirrious.FluentLayout/Cirrious.FluentLayouts.Touch.csproj --no-restore /p:Version=${{ steps.gitversion.outputs.semVer }} /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} /p:InformationalVersion=${{ steps.gitversion.outputs.informationalVersion }}
3339

3440
- name: Upload a Build Artifact
3541
uses: actions/upload-artifact@v3.1.1

GitVersion.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mode: mainline

0 commit comments

Comments
 (0)