From da4ddec4f8d43a07153bb58f9c10bc01eb694166 Mon Sep 17 00:00:00 2001 From: Anders Heintz Date: Tue, 20 Aug 2024 10:16:29 +0200 Subject: [PATCH] Testing 7 --- .github/workflows/dotnet.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 54a0767..b763e3d 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -25,10 +25,16 @@ jobs: - name: Restore dependencies run: dotnet restore - name: Extract branch name if release + if: startsWith(github.ref, 'refs/heads/release') != true shell: bash - run: echo "BRANCH=$(echo $GITHUB_REF)" + #run: echo "BRANCH=0.0.1" >> $GITHUB_ENV + run: echo "BRANCH=$(echo $GITHUB_REF | cut -d '/' -f 4)" >> $GITHUB_ENV + - name: Extract branch name if not release + if: startsWith(github.ref, 'refs/heads/release') + shell: bash + run: echo "BRANCH=$(echo $GITHUB_REF | cut -d '/' -f 4)" >> $GITHUB_ENV - name: Build - run: dotnet build --no-restore + run: dotnet build --no-restore -c Release /property:Version=${{ env.BRANCH }} - name: Test run: dotnet test --no-build --verbosity normal --filter "TestCategory!=Integration" - name: Publish