From 38511c1d18cb2349e232cbd5a86f7169992eda6e Mon Sep 17 00:00:00 2001 From: Kim Hugener-Ohlsen Date: Thu, 30 Nov 2023 23:10:25 +0100 Subject: [PATCH] Downgrade CodeAnalysis for better vs compatibility GHA: updated workflow => release --- .github/workflows/dotnet.yml | 14 ++++++++------ Source/Sundew.Base | 2 +- .../Sundew.DiscriminatedUnions.Analyzer.csproj | 2 +- .../Sundew.DiscriminatedUnions.CodeFixes.csproj | 2 +- ...w.DiscriminatedUnions.Generator.Baseline.csproj | 2 +- ...minatedUnions.Generator.IntegrationTests.csproj | 2 +- ...minatedUnions.Generator.PerformanceTests.csproj | 2 +- .../Sundew.DiscriminatedUnions.Generator.csproj | 2 +- .../Sundew.DiscriminatedUnions.Shared.csproj | 2 +- 9 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index ffa3f42..ef5f172 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -37,13 +37,15 @@ jobs: - name: Build setup id: build-setup run: > - dotnet tool update Sundew.Packaging.Tool -g --version 8.8.* + dotnet tool update Sundew.Packaging.Tool -g --version 8.10.* dotnet tool update CommandlineBatcher -g --version 8.6.* git rev-parse --short=10 HEAD | cb -c ">> $GITHUB_OUTPUT|git-hash={0}{NL}" --batches-stdin cb match -p "(?^(?!(refs/pull.*|refs/heads/$)).+) => git-branch-name={Input}" -i "refs/heads/${{ github.base_ref }}" "${{ github.ref }}" -of $GITHUB_OUTPUT + + git log -1 --pretty=%B > git_commit_message.txt - name: Stage Build id: stage-build run: > @@ -53,21 +55,21 @@ jobs: --development "refs/heads/(?:develop.*|feature/(?.+)|bugfix/(?.+)) => ${{ secrets.SPP_DEVELOPMENT_API_KEY }}@${{ env.dev-source }} {${{ env.dev-source-latest-version }}}|${{ secrets.SPP_DEVELOPMENT_API_KEY }}@${{ env.dev-symbols-source }}||Configuration=Debug|DevFeedSource= -s ${{ env.dev-source-latest-version }}" --no-stage "Configuration=Release" --stage "${{ github.ref }}" + --build-promotion-input "< git_commit_message.txt" + --build-promotion-regex "=>\s*release" --prerelease-format "u{DateTime}-{Stage}-{Postfix}" --metadata ${{ steps.build-setup.outputs.git-hash }} --force-version '"${{ secrets.SPP_FORCE_VERSION_IF_SET }}"' --output-formats "Selected stage: {Stage}, {FullVersion}, {Configuration}" ">|stage={Stage}{NL}" ">|version={Version}{NL}" ">|buildConfiguration={Configuration}{NL}" ">|nuGetPackagesPath={WorkingDirectory}/NuGet{NL}" ">|dev-package-source-if-set={DevFeedSource}{NL}" ">|feedSource={FeedSource}{NL}" ">|pushSource={PushSource}{NL}" ">|apiKey={ApiKey}{NL}" ">|fullVersion={FullVersion}{NL}" ">|symbolsPushSource={SymbolsPushSource}{NL}" - ">|symbolsApiKey={SymbolsApiKey}{NL}" + ">|symbolsApiKey={SymbolsApiKey}{NL}" ">|buildPromotion={BuildPromotion}" --output-file $GITHUB_OUTPUT - cb match -p "^refs/tags/release[^/]*$ => isReleaseCommand=true" -i "${{ github.ref }}" -of $GITHUB_OUTPUT - cb match -p "^(?!^(refs/heads/main|refs/tags/release)$).*$ => test-filter-if-set= --filter TestCategory!~MainBranchBuilds" -i "${{ steps.build-setup.outputs.git-branch-name }}" -of $GITHUB_OUTPUT - name: 'Remove release tag' - if: ${{ steps.stage-build.outputs.stage == 'production' }} - run: cb --if "${{ steps.stage-build.outputs.isReleaseCommand }} == true" -c "git|push --delete ${{ env.repository }} ${{ github.ref }}" + if: ${{ steps.stage-build.outputs.stage == 'production' && steps.stage-build.outputs.buildPromotion != 'promoted' }} + run: git push --delete ${{ env.repository }} ${{ github.ref }} - name: Restore run: dotnet restore ${{ env.solutionPath }} --verbosity normal -s ${{ env.source }}${{ steps.stage-build.outputs.dev-package-source-if-set }} - name: Build diff --git a/Source/Sundew.Base b/Source/Sundew.Base index d8f57b8..8ee21b1 160000 --- a/Source/Sundew.Base +++ b/Source/Sundew.Base @@ -1 +1 @@ -Subproject commit d8f57b8c8d193ab51b462102801109072b8221e8 +Subproject commit 8ee21b13da232d07dbdfaf48089ae9d122264046 diff --git a/Source/Sundew.DiscriminatedUnions.Analyzer/Sundew.DiscriminatedUnions.Analyzer.csproj b/Source/Sundew.DiscriminatedUnions.Analyzer/Sundew.DiscriminatedUnions.Analyzer.csproj index 50f2872..dcb853b 100644 --- a/Source/Sundew.DiscriminatedUnions.Analyzer/Sundew.DiscriminatedUnions.Analyzer.csproj +++ b/Source/Sundew.DiscriminatedUnions.Analyzer/Sundew.DiscriminatedUnions.Analyzer.csproj @@ -26,7 +26,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Source/Sundew.DiscriminatedUnions.CodeFixes/Sundew.DiscriminatedUnions.CodeFixes.csproj b/Source/Sundew.DiscriminatedUnions.CodeFixes/Sundew.DiscriminatedUnions.CodeFixes.csproj index d750b7e..7685729 100644 --- a/Source/Sundew.DiscriminatedUnions.CodeFixes/Sundew.DiscriminatedUnions.CodeFixes.csproj +++ b/Source/Sundew.DiscriminatedUnions.CodeFixes/Sundew.DiscriminatedUnions.CodeFixes.csproj @@ -19,7 +19,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Source/Sundew.DiscriminatedUnions.Generator.Baseline/Sundew.DiscriminatedUnions.Generator.Baseline.csproj b/Source/Sundew.DiscriminatedUnions.Generator.Baseline/Sundew.DiscriminatedUnions.Generator.Baseline.csproj index ffe967a..9d4c5e9 100644 --- a/Source/Sundew.DiscriminatedUnions.Generator.Baseline/Sundew.DiscriminatedUnions.Generator.Baseline.csproj +++ b/Source/Sundew.DiscriminatedUnions.Generator.Baseline/Sundew.DiscriminatedUnions.Generator.Baseline.csproj @@ -43,7 +43,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Source/Sundew.DiscriminatedUnions.Generator.IntegrationTests/Sundew.DiscriminatedUnions.Generator.IntegrationTests.csproj b/Source/Sundew.DiscriminatedUnions.Generator.IntegrationTests/Sundew.DiscriminatedUnions.Generator.IntegrationTests.csproj index a3c4840..bb7a0e7 100644 --- a/Source/Sundew.DiscriminatedUnions.Generator.IntegrationTests/Sundew.DiscriminatedUnions.Generator.IntegrationTests.csproj +++ b/Source/Sundew.DiscriminatedUnions.Generator.IntegrationTests/Sundew.DiscriminatedUnions.Generator.IntegrationTests.csproj @@ -17,7 +17,7 @@ - + diff --git a/Source/Sundew.DiscriminatedUnions.Generator.PerformanceTests/Sundew.DiscriminatedUnions.Generator.PerformanceTests.csproj b/Source/Sundew.DiscriminatedUnions.Generator.PerformanceTests/Sundew.DiscriminatedUnions.Generator.PerformanceTests.csproj index 5dde6a5..f51918a 100644 --- a/Source/Sundew.DiscriminatedUnions.Generator.PerformanceTests/Sundew.DiscriminatedUnions.Generator.PerformanceTests.csproj +++ b/Source/Sundew.DiscriminatedUnions.Generator.PerformanceTests/Sundew.DiscriminatedUnions.Generator.PerformanceTests.csproj @@ -10,7 +10,7 @@ - + diff --git a/Source/Sundew.DiscriminatedUnions.Generator/Sundew.DiscriminatedUnions.Generator.csproj b/Source/Sundew.DiscriminatedUnions.Generator/Sundew.DiscriminatedUnions.Generator.csproj index 0e55805..67bdaaf 100644 --- a/Source/Sundew.DiscriminatedUnions.Generator/Sundew.DiscriminatedUnions.Generator.csproj +++ b/Source/Sundew.DiscriminatedUnions.Generator/Sundew.DiscriminatedUnions.Generator.csproj @@ -41,7 +41,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Source/Sundew.DiscriminatedUnions.Shared/Sundew.DiscriminatedUnions.Shared.csproj b/Source/Sundew.DiscriminatedUnions.Shared/Sundew.DiscriminatedUnions.Shared.csproj index 51e6eba..2aea5e1 100644 --- a/Source/Sundew.DiscriminatedUnions.Shared/Sundew.DiscriminatedUnions.Shared.csproj +++ b/Source/Sundew.DiscriminatedUnions.Shared/Sundew.DiscriminatedUnions.Shared.csproj @@ -27,7 +27,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive