From 3fe566acb40c3ab6c112b27c86ad5efdf095b4bf Mon Sep 17 00:00:00 2001 From: Nils Herde Date: Wed, 11 Dec 2024 10:23:21 +0100 Subject: [PATCH 1/2] ci: Reorder release file --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 09ba23d6..db9734b2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,10 +14,6 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: 8.0.403 - - name: Install dependencies - run: dotnet restore - - name: Build - run: dotnet build --configuration Release --no-restore - name: Set release version run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV - name: Set assembly version to major semver @@ -28,6 +24,10 @@ jobs: run: sed -i -e "s|0.0.0.0<\/Version>|$RELEASE_VERSION<\/Version>|g" Directory.Build.props - name: Sed AssemblyVersion number for build purposes run: sed -i -e "s|0.0.0.0<\/AssemblyVersion>>|$RELEASE_VERSION<\/AssemblyVersion>>|g" Directory.Build.props + - name: Install dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore - name: Pack nupkg run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION -p:InformationalVersion=$RELEASE_VERSION --configuration Release --no-build --output digipost/packed Digipost.Signature.Api.Client.Core - name: Pack nupkg From 32f73b34151d6176ad14786bcc0f00d029150a12 Mon Sep 17 00:00:00 2001 From: Nils Herde Date: Mon, 16 Dec 2024 10:19:55 +0100 Subject: [PATCH 2/2] ci: Try to set version in build step --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index db9734b2..5549c696 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: - name: Install dependencies run: dotnet restore - name: Build - run: dotnet build --configuration Release --no-restore + run: dotnet build -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION -p:InformationalVersion=$RELEASE_VERSION --configuration Release --no-restore - name: Pack nupkg run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION -p:InformationalVersion=$RELEASE_VERSION --configuration Release --no-build --output digipost/packed Digipost.Signature.Api.Client.Core - name: Pack nupkg