From 93a327f430fe76bc3ba60d479f669074a08981a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorstein=20L=C3=B8kensgard?= Date: Thu, 16 Nov 2023 14:01:10 +0100 Subject: [PATCH] ci: try running dotnet setup before nuke --- .github/workflows/Build_and_Test.yml | 4 ++++ Serilog.Enrichers.AzureClaims.sln | 4 ++++ build/Build.cs | 4 +--- build/_build.csproj | 3 +-- global.json | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Build_and_Test.yml b/.github/workflows/Build_and_Test.yml index 475d025..a9ac1e6 100644 --- a/.github/workflows/Build_and_Test.yml +++ b/.github/workflows/Build_and_Test.yml @@ -38,6 +38,10 @@ jobs: .nuke/temp ~/.nuget/packages key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} + - name: Setup dotnet + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '8.0.x' - name: 'Run: Test' run: ./build.cmd Test - name: 'Publish: test-results' diff --git a/Serilog.Enrichers.AzureClaims.sln b/Serilog.Enrichers.AzureClaims.sln index 1828b3b..92f36ed 100644 --- a/Serilog.Enrichers.AzureClaims.sln +++ b/Serilog.Enrichers.AzureClaims.sln @@ -16,12 +16,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Enrichers.AzureClai EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Enrichers.AzureClaims.Tests", "tests\Serilog.Enrichers.AzureClaims.Tests\Serilog.Enrichers.AzureClaims.Tests.csproj", "{EAECB584-06F0-47BD-8A95-479C7E51ACF2}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{7BD92553-AD6B-438D-AEB7-2299509CC953}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7BD92553-AD6B-438D-AEB7-2299509CC953}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7BD92553-AD6B-438D-AEB7-2299509CC953}.Release|Any CPU.ActiveCfg = Release|Any CPU {3FFC6CC2-072F-4E1A-8941-13030DC2049A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3FFC6CC2-072F-4E1A-8941-13030DC2049A}.Debug|Any CPU.Build.0 = Debug|Any CPU {3FFC6CC2-072F-4E1A-8941-13030DC2049A}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/build/Build.cs b/build/Build.cs index 67da103..40a20fe 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -2,7 +2,6 @@ using Nuke.Common.CI; using Nuke.Common.IO; using Nuke.Common.Tools.DotNet; -using Nuke.Common.Tools.GitVersion; [ShutdownDotNetAfterServerBuild] partial class Build : NukeBuild @@ -12,7 +11,6 @@ partial class Build : NukeBuild [Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release; - Target Clean => _ => _ .Before(Restore) .Executes(() => @@ -43,4 +41,4 @@ partial class Build : NukeBuild .SetInformationalVersion(GitVersion.InformationalVersion) .EnableNoRestore()); }); -} \ No newline at end of file +} diff --git a/build/_build.csproj b/build/_build.csproj index 149bd3c..4574032 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -1,4 +1,4 @@ - + Exe @@ -13,7 +13,6 @@ - diff --git a/global.json b/global.json index 757d216..f3365c4 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "8.0.100" // Specify the .NET SDK version you intend to use + "version": "8.0.100" } } \ No newline at end of file