From 09f3a7503251f51843d463fa714b9687238f5556 Mon Sep 17 00:00:00 2001 From: Michiel Oda Date: Tue, 24 Dec 2024 13:28:17 +0100 Subject: [PATCH] Attempt to get rid of setting the version manually. --- .github/workflows/CreateSignNuGet.yml | 9 +++++++-- working/templatepack.csproj | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CreateSignNuGet.yml b/.github/workflows/CreateSignNuGet.yml index 5c58519..1dc7b55 100644 --- a/.github/workflows/CreateSignNuGet.yml +++ b/.github/workflows/CreateSignNuGet.yml @@ -16,8 +16,13 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Create NuGet Package - run: dotnet pack ./working + - name: Create NuGet Package (Branch) + if: github.ref_type != 'tag' + run: dotnet pack ./working --version-suffix "ci-${{ github.run_number }}" -c Release + + - name: Create NuGet Package (Tag) + if: github.ref_type == 'tag' + run: dotnet pack ./working -p:PackageVersion=${{ github.ref_name }} -c Release - name: Find created nuget id: findcreatednuget diff --git a/working/templatepack.csproj b/working/templatepack.csproj index 691f379..4160716 100644 --- a/working/templatepack.csproj +++ b/working/templatepack.csproj @@ -2,7 +2,7 @@ template - 1.0.17 + 1.0.0 Skyline.DataMiner.VisualStudioTemplates DataMiner DotNet Templates SkylineCommunications