From 5a35348430b3d59e965d1a7dd5f38d327c8a3787 Mon Sep 17 00:00:00 2001 From: Tomasz Cielecki Date: Sun, 30 Oct 2022 18:39:45 +0100 Subject: [PATCH] Add gitversion to build script --- .github/workflows/build.yml | 8 +++++++- GitVersion.yml | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 GitVersion.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b26695e..e2ae90a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,11 +25,17 @@ jobs: - name: Install .NET Workloads run: dotnet workload install ios maccatalyst + - name: Determine Version + id: gitversion + uses: gittools/actions/gitversion/execute@v0.9.7 + with: + useConfigFile: true + - name: Restore dependencies run: dotnet restore - name: Build - run: dotnet build Cirrious.FluentLayout/Cirrious.FluentLayouts.Touch.csproj --no-restore + 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 }} - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.1 diff --git a/GitVersion.yml b/GitVersion.yml new file mode 100644 index 0000000..d3efabf --- /dev/null +++ b/GitVersion.yml @@ -0,0 +1 @@ +mode: mainline \ No newline at end of file