diff --git a/.build/Pipelines/GitHubActions.cs b/.build/Pipelines/GitHubActions.cs index 3879c7f..e25b8c0 100644 --- a/.build/Pipelines/GitHubActions.cs +++ b/.build/Pipelines/GitHubActions.cs @@ -30,15 +30,14 @@ // Continuous Integration: Validate pull requests [GitHubActions( "pr-validation", - GitHubActionsImage.UbuntuLatest, + GitHubActionsImage.WindowsLatest, InvokedTargets = [ nameof(Solution_Build), ], - OnPullRequestBranches = ["master"] + OnPullRequestBranches = ["main"] )] -[SuppressMessage("ReSharper", "CheckNamespace")] -// CI/CD targets +[SuppressMessage("ReSharper", "CheckNamespace")] partial class Build { Target UpdateYaml => _ => _.Executes(() => Log.Information("Generating YAML...")); diff --git a/.build/Targets/Solution_Targets.cs b/.build/Targets/Solution_Targets.cs index 2a520da..2ef32be 100644 --- a/.build/Targets/Solution_Targets.cs +++ b/.build/Targets/Solution_Targets.cs @@ -3,6 +3,7 @@ using System.IO; using System.Linq; using Nuke.Common; +using Nuke.Common.Tooling; using Nuke.Common.Tools.DotNet; using static Nuke.Common.Tools.DotNet.DotNetTasks; diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index fe0207d..884e212 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -19,12 +19,12 @@ name: pr-validation on: pull_request: branches: - - master + - main jobs: - ubuntu-latest: - name: ubuntu-latest - runs-on: ubuntu-latest + windows-latest: + name: windows-latest + runs-on: windows-latest steps: - uses: actions/checkout@v4 - name: 'Cache: .nuke/temp, ~/.nuget/packages' diff --git a/.gitignore b/.gitignore index 9f814b4..f82e564 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ .vs/ .vscode/ .idea -.nuke/ +.nuke/temp/ [Bb]in/ [Oo]bj/ packages/ diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json new file mode 100644 index 0000000..7027367 --- /dev/null +++ b/.nuke/build.schema.json @@ -0,0 +1,138 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "properties": { + "Configuration": { + "type": "string", + "description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)", + "enum": [ + "Debug", + "Release" + ] + }, + "ExtensionLibVersion": { + "type": "string", + "description": "Extension library version" + }, + "ExtensionName": { + "type": "string", + "description": "Extension library name" + }, + "PushApiKey": { + "type": "string", + "description": "NuGet push API key" + }, + "SharedLibVersion": { + "type": "string", + "description": "Shared library version" + }, + "Solution": { + "type": "string", + "description": "Path to a solution file that is automatically loaded" + } + }, + "definitions": { + "Host": { + "type": "string", + "enum": [ + "AppVeyor", + "AzurePipelines", + "Bamboo", + "Bitbucket", + "Bitrise", + "GitHubActions", + "GitLab", + "Jenkins", + "Rider", + "SpaceAutomation", + "TeamCity", + "Terminal", + "TravisCI", + "VisualStudio", + "VSCode" + ] + }, + "ExecutableTarget": { + "type": "string", + "enum": [ + "Extension_Build", + "Extension_FindNextVersion", + "Extension_Push", + "Shared_Build", + "Shared_FindNextVersion", + "Shared_Push", + "Solution_Build", + "Solution_Clean", + "Solution_Restore", + "UpdateYaml" + ] + }, + "Verbosity": { + "type": "string", + "description": "", + "enum": [ + "Verbose", + "Normal", + "Minimal", + "Quiet" + ] + }, + "NukeBuild": { + "properties": { + "Continue": { + "type": "boolean", + "description": "Indicates to continue a previously failed build attempt" + }, + "Help": { + "type": "boolean", + "description": "Shows the help text for this build assembly" + }, + "Host": { + "description": "Host for execution. Default is 'automatic'", + "$ref": "#/definitions/Host" + }, + "NoLogo": { + "type": "boolean", + "description": "Disables displaying the NUKE logo" + }, + "Partition": { + "type": "string", + "description": "Partition to use on CI" + }, + "Plan": { + "type": "boolean", + "description": "Shows the execution plan (HTML)" + }, + "Profile": { + "type": "array", + "description": "Defines the profiles to load", + "items": { + "type": "string" + } + }, + "Root": { + "type": "string", + "description": "Root directory during build execution" + }, + "Skip": { + "type": "array", + "description": "List of targets to be skipped. Empty list skips all dependencies", + "items": { + "$ref": "#/definitions/ExecutableTarget" + } + }, + "Target": { + "type": "array", + "description": "List of targets to be invoked. Default is '{default_target}'", + "items": { + "$ref": "#/definitions/ExecutableTarget" + } + }, + "Verbosity": { + "description": "Logging verbosity during build execution. Default is 'Normal'", + "$ref": "#/definitions/Verbosity" + } + } + } + }, + "$ref": "#/definitions/NukeBuild" +} diff --git a/.nuke/parameters.json b/.nuke/parameters.json new file mode 100644 index 0000000..59809cc --- /dev/null +++ b/.nuke/parameters.json @@ -0,0 +1,4 @@ +{ + "$schema": "build.schema.json", + "Solution": "RestApia.Shared.sln" +} diff --git a/build.cmd b/build.cmd old mode 100644 new mode 100755 diff --git a/nuget.config b/nuget.config deleted file mode 100644 index 94714a1..0000000 --- a/nuget.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/Directory.Build.props b/src/Directory.Build.props index b956c0a..f4a237b 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -40,5 +40,4 @@ - \ No newline at end of file diff --git a/src/Extensions/Directory.Build.props b/src/Extensions/Directory.Build.props index 131cc90..90224b6 100644 --- a/src/Extensions/Directory.Build.props +++ b/src/Extensions/Directory.Build.props @@ -6,23 +6,21 @@ https://github.com/RestApia/RestApia.Shared MIT README.md - RestApia, Extension - - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/src/Extensions/RestApia.Extensions.Auth.Basic/RestApia.Extensions.Auth.Basic.csproj b/src/Extensions/RestApia.Extensions.Auth.Basic/RestApia.Extensions.Auth.Basic.csproj index aefd825..7e4696b 100644 --- a/src/Extensions/RestApia.Extensions.Auth.Basic/RestApia.Extensions.Auth.Basic.csproj +++ b/src/Extensions/RestApia.Extensions.Auth.Basic/RestApia.Extensions.Auth.Basic.csproj @@ -3,6 +3,6 @@ Basic Authorization extension Generate Authorization header based on settings for requests. https://github.com/RestApia/RestApia.Shared/tree/main/src/Extensions/RestApia.Extensions.Auth.Basic - 1.0.6 + RestApiaEmbedded, Extension diff --git a/src/Extensions/RestApia.Extensions.Auth.OAuth2/RestApia.Extensions.Auth.OAuth2.csproj b/src/Extensions/RestApia.Extensions.Auth.OAuth2/RestApia.Extensions.Auth.OAuth2.csproj index abacf95..d50d102 100644 --- a/src/Extensions/RestApia.Extensions.Auth.OAuth2/RestApia.Extensions.Auth.OAuth2.csproj +++ b/src/Extensions/RestApia.Extensions.Auth.OAuth2/RestApia.Extensions.Auth.OAuth2.csproj @@ -2,8 +2,8 @@ OAuth2 Authorization extension Extension provides OAuth2 Implicit and AuthCode authorizations - 1.0.6 https://github.com/RestApia/RestApia.Shared/tree/main/src/Extensions/RestApia.Extensions.Auth.OAuth2 + RestApiaEmbedded, Extension diff --git a/src/RestApia.Shared/RestApia.Shared.csproj b/src/RestApia.Shared/RestApia.Shared.csproj index 9138357..b034137 100644 --- a/src/RestApia.Shared/RestApia.Shared.csproj +++ b/src/RestApia.Shared/RestApia.Shared.csproj @@ -14,12 +14,4 @@ - - - - - - - -