From 16b86062db858c07fe6a386f7bda73bf745a5637 Mon Sep 17 00:00:00 2001 From: JT <975824+Hawxy@users.noreply.github.com> Date: Sun, 17 Nov 2024 17:36:26 +0800 Subject: [PATCH] v4.0.0 (#28) * v4.0.0 * Install .NET 9 in pipeline * Disable cache --------- Co-authored-by: JT --- .github/workflows/Build_&_Test.yml | 10 +- .github/workflows/Manual_Nuget_Push.yml | 10 +- .nuke/build.schema.json | 122 ++++++++++-------- README.md | 2 +- build/Build.cs | 6 +- build/_build.csproj | 2 +- .../Sample.AspNetCore.csproj | 6 +- .../Sample.ConsoleApp.csproj | 10 +- .../Auth0Net.DependencyInjection.csproj | 34 +++-- .../Auth0Net.DependencyInjection.Tests.csproj | 4 +- 10 files changed, 102 insertions(+), 104 deletions(-) diff --git a/.github/workflows/Build_&_Test.yml b/.github/workflows/Build_&_Test.yml index 45c0609..3b5643e 100644 --- a/.github/workflows/Build_&_Test.yml +++ b/.github/workflows/Build_&_Test.yml @@ -29,13 +29,9 @@ jobs: name: ubuntu-latest runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: 'Cache: .nuke/temp, ~/.nuget/packages' - uses: actions/cache@v3 + - uses: actions/setup-dotnet@v4 with: - path: | - .nuke/temp - ~/.nuget/packages - key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} + dotnet-version: '9' + - uses: actions/checkout@v4 - name: 'Run: Test' run: ./build.cmd Test diff --git a/.github/workflows/Manual_Nuget_Push.yml b/.github/workflows/Manual_Nuget_Push.yml index 799fe86..1fce492 100644 --- a/.github/workflows/Manual_Nuget_Push.yml +++ b/.github/workflows/Manual_Nuget_Push.yml @@ -23,14 +23,10 @@ jobs: name: ubuntu-latest runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: 'Cache: .nuke/temp, ~/.nuget/packages' - uses: actions/cache@v3 + - uses: actions/setup-dotnet@v4 with: - path: | - .nuke/temp - ~/.nuget/packages - key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} + dotnet-version: '9' + - uses: actions/checkout@v4 - name: 'Run: NugetPush' run: ./build.cmd NugetPush env: diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json index 52dad19..38604bc 100644 --- a/.nuke/build.schema.json +++ b/.nuke/build.schema.json @@ -1,10 +1,48 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "$ref": "#/definitions/build", - "title": "Build Schema", "definitions": { - "build": { - "type": "object", + "Host": { + "type": "string", + "enum": [ + "AppVeyor", + "AzurePipelines", + "Bamboo", + "Bitbucket", + "Bitrise", + "GitHubActions", + "GitLab", + "Jenkins", + "Rider", + "SpaceAutomation", + "TeamCity", + "Terminal", + "TravisCI", + "VisualStudio", + "VSCode" + ] + }, + "ExecutableTarget": { + "type": "string", + "enum": [ + "Clean", + "Compile", + "NugetPack", + "NugetPush", + "Restore", + "Test" + ] + }, + "Verbosity": { + "type": "string", + "description": "", + "enum": [ + "Verbose", + "Normal", + "Minimal", + "Quiet" + ] + }, + "NukeBuild": { "properties": { "Continue": { "type": "boolean", @@ -15,35 +53,13 @@ "description": "Shows the help text for this build assembly" }, "Host": { - "type": "string", "description": "Host for execution. Default is 'automatic'", - "enum": [ - "AppVeyor", - "AzurePipelines", - "Bamboo", - "Bitbucket", - "Bitrise", - "GitHubActions", - "GitLab", - "Jenkins", - "Rider", - "SpaceAutomation", - "TeamCity", - "Terminal", - "TravisCI", - "VisualStudio", - "VSCode" - ] + "$ref": "#/definitions/Host" }, "NoLogo": { "type": "boolean", "description": "Disables displaying the NUKE logo" }, - "NugetApiKey": { - "type": "string", - "description": "Nuget Api Key", - "default": "Secrets must be entered via 'nuke :secrets [profile]'" - }, "Partition": { "type": "string", "description": "Partition to use on CI" @@ -67,47 +83,39 @@ "type": "array", "description": "List of targets to be skipped. Empty list skips all dependencies", "items": { - "type": "string", - "enum": [ - "Clean", - "Compile", - "NugetPack", - "NugetPush", - "Restore", - "Test" - ] + "$ref": "#/definitions/ExecutableTarget" } }, - "Solution": { - "type": "string", - "description": "Path to a solution file that is automatically loaded" - }, "Target": { "type": "array", "description": "List of targets to be invoked. Default is '{default_target}'", "items": { - "type": "string", - "enum": [ - "Clean", - "Compile", - "NugetPack", - "NugetPush", - "Restore", - "Test" - ] + "$ref": "#/definitions/ExecutableTarget" } }, "Verbosity": { - "type": "string", "description": "Logging verbosity during build execution. Default is 'Normal'", - "enum": [ - "Minimal", - "Normal", - "Quiet", - "Verbose" - ] + "$ref": "#/definitions/Verbosity" + } + } + } + }, + "allOf": [ + { + "properties": { + "NugetApiKey": { + "type": "string", + "description": "Nuget Api Key", + "default": "Secrets must be entered via 'nuke :secrets [profile]'" + }, + "Solution": { + "type": "string", + "description": "Path to a solution file that is automatically loaded" } } + }, + { + "$ref": "#/definitions/NukeBuild" } - } + ] } diff --git a/README.md b/README.md index f7d2e9a..ff7962f 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ This library hopes to solve that problem, featuring: :white_check_mark: `IHttpClientBuilder` extensions, providing handlers to automatically append access tokens to outgoing requests. - This library is compatible with all .NET Standard 2.0 runtimes (.NET 6+ recommended) and is suitable for use in ASP.NET Core and standalone .NET Generic Host applications. + This library is compatible with all .NET Standard 2.0 runtimes (.NET 8+ recommended) and is suitable for use in ASP.NET Core and standalone .NET Generic Host applications. ## Install diff --git a/build/Build.cs b/build/Build.cs index 9c1accc..cc4ac29 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -20,13 +20,15 @@ GitHubActionsImage.UbuntuLatest, OnPushBranches = new []{ "main" }, OnPullRequestBranches = new []{ "main" }, - InvokedTargets = new[] { nameof(Test) })] + InvokedTargets = new[] { nameof(Test) }, + AutoGenerate = false)] [GitHubActions( "Manual Nuget Push", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(NugetPush) }, - ImportSecrets = new[] { nameof(NugetApiKey) })] + ImportSecrets = new[] { nameof(NugetApiKey) }, + AutoGenerate = false)] class Build : NukeBuild { /// Support plugins are available for: diff --git a/build/_build.csproj b/build/_build.csproj index 5331a66..7694661 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -11,7 +11,7 @@ - + diff --git a/samples/Sample.AspNetCore/Sample.AspNetCore.csproj b/samples/Sample.AspNetCore/Sample.AspNetCore.csproj index 0448d56..6918c82 100644 --- a/samples/Sample.AspNetCore/Sample.AspNetCore.csproj +++ b/samples/Sample.AspNetCore/Sample.AspNetCore.csproj @@ -1,15 +1,15 @@  - net8.0 + net9.0 ed89c14f-ea75-4b37-83e7-078870067ffc enable enable - - + + diff --git a/samples/Sample.ConsoleApp/Sample.ConsoleApp.csproj b/samples/Sample.ConsoleApp/Sample.ConsoleApp.csproj index 947acd9..c20668a 100644 --- a/samples/Sample.ConsoleApp/Sample.ConsoleApp.csproj +++ b/samples/Sample.ConsoleApp/Sample.ConsoleApp.csproj @@ -2,20 +2,20 @@ Exe - net8.0 + net9.0 enable enable 096fd757-814d-4d2a-a02e-ef4f19cdc656 - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/Auth0Net.DependencyInjection/Auth0Net.DependencyInjection.csproj b/src/Auth0Net.DependencyInjection/Auth0Net.DependencyInjection.csproj index 2c67096..c10468d 100644 --- a/src/Auth0Net.DependencyInjection/Auth0Net.DependencyInjection.csproj +++ b/src/Auth0Net.DependencyInjection/Auth0Net.DependencyInjection.csproj @@ -1,11 +1,11 @@  - netstandard2.0;net6.0;net7.0;net8.0 + netstandard2.0;net8.0;net9.0 true enable enable - 3.2.0 + 4.0.0 Hawxy Dependency Injection, HttpClientFactory & ASP.NET Core extensions for Auth0.NET latest @@ -21,34 +21,30 @@ - - - - - + + + + + - + - - - - - - - - - - - + + + + + + + <_Parameter1>$(MSBuildProjectName).Tests diff --git a/tests/Auth0Net.DependencyInjection.Tests/Auth0Net.DependencyInjection.Tests.csproj b/tests/Auth0Net.DependencyInjection.Tests/Auth0Net.DependencyInjection.Tests.csproj index 6a2e428..c62ec90 100644 --- a/tests/Auth0Net.DependencyInjection.Tests/Auth0Net.DependencyInjection.Tests.csproj +++ b/tests/Auth0Net.DependencyInjection.Tests/Auth0Net.DependencyInjection.Tests.csproj @@ -2,8 +2,8 @@ false - net48;net6.0;net7.0;net8.0 - latest + net48;net8.0;net9.0 + latest