diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index efce7ef1..d82adb3e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -26,12 +26,12 @@ jobs:
if: needs.can_document.outputs.value == 'true'
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v5
- name: Use Node.js
- uses: actions/setup-node@v1
+ uses: actions/setup-node@v5
with:
- node-version: "14.x"
+ node-version: "20.x"
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies
@@ -48,15 +48,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v5
- name: Setup dotnet
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v5
with:
dotnet-version: |
- 6.0.x
- 7.0.x
- 8.0.x
+ 10.0.x
- name: Build
run: ./build.sh
@@ -65,15 +63,13 @@ jobs:
runs-on: windows-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v5
- name: Setup dotnet
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v5
with:
dotnet-version: |
- 6.0.x
- 7.0.x
- 8.0.x
+ 10.0.x
- name: Build
run: |
diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json
index c1999a9f..3166f3eb 100644
--- a/.nuke/build.schema.json
+++ b/.nuke/build.schema.json
@@ -1,19 +1,56 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
- "title": "Build Schema",
- "$ref": "#/definitions/build",
"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",
+ "CopyFiles",
+ "CreatePackage",
+ "Default",
+ "Package",
+ "PrePublish",
+ "Publish",
+ "PublishPackage",
+ "PublishPreRelease",
+ "PublishRelease",
+ "Restore",
+ "RunUnitTests"
+ ]
+ },
+ "Verbosity": {
+ "type": "string",
+ "description": "",
+ "enum": [
+ "Verbose",
+ "Normal",
+ "Minimal",
+ "Quiet"
+ ]
+ },
+ "NukeBuild": {
"properties": {
- "Configuration": {
- "type": "string",
- "description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
- "enum": [
- "Debug",
- "Release"
- ]
- },
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
@@ -23,25 +60,8 @@
"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",
@@ -62,10 +82,6 @@
"type": "string"
}
},
- "ReleaseNotesFilePath": {
- "type": "string",
- "description": "ReleaseNotesFilePath - To determine the SemanticVersion"
- },
"Root": {
"type": "string",
"description": "Root directory during build execution"
@@ -74,61 +90,46 @@
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
- "type": "string",
- "enum": [
- "Clean",
- "Compile",
- "CopyFiles",
- "CreatePackage",
- "Default",
- "Package",
- "PrePublish",
- "Publish",
- "PublishPackage",
- "PublishPreRelease",
- "PublishRelease",
- "Restore",
- "RunUnitTests"
- ]
+ "$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",
- "CopyFiles",
- "CreatePackage",
- "Default",
- "Package",
- "PrePublish",
- "Publish",
- "PublishPackage",
- "PublishPreRelease",
- "PublishRelease",
- "Restore",
- "RunUnitTests"
- ]
+ "$ref": "#/definitions/ExecutableTarget"
}
},
"Verbosity": {
- "type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
+ "$ref": "#/definitions/Verbosity"
+ }
+ }
+ }
+ },
+ "allOf": [
+ {
+ "properties": {
+ "Configuration": {
+ "type": "string",
+ "description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
- "Minimal",
- "Normal",
- "Quiet",
- "Verbose"
+ "Debug",
+ "Release"
]
+ },
+ "ReleaseNotesFilePath": {
+ "type": "string",
+ "description": "ReleaseNotesFilePath - To determine the SemanticVersion"
+ },
+ "Solution": {
+ "type": "string",
+ "description": "Path to a solution file that is automatically loaded"
}
}
+ },
+ {
+ "$ref": "#/definitions/NukeBuild"
}
- }
-}
\ No newline at end of file
+ ]
+}
diff --git a/build.cmd b/build.cmd
old mode 100644
new mode 100755
diff --git a/build.ps1 b/build.ps1
index 1f264e7f..3cca4ef3 100644
--- a/build.ps1
+++ b/build.ps1
@@ -18,11 +18,10 @@ $TempDirectory = "$PSScriptRoot\\.nuke\temp"
$DotNetGlobalFile = "$PSScriptRoot\\global.json"
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
-$DotNetChannel = "Current"
+$DotNetChannel = "STS"
-$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
-$env:DOTNET_MULTILEVEL_LOOKUP = 0
+$env:DOTNET_NOLOGO = 1
###########################################################################
# EXECUTION
@@ -61,9 +60,15 @@ else {
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
}
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
+ $env:PATH = "$DotNetDirectory;$env:PATH"
}
Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)"
+if (Test-Path env:NUKE_ENTERPRISE_TOKEN) {
+ & $env:DOTNET_EXE nuget remove source "nuke-enterprise" > $null
+ & $env:DOTNET_EXE nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password $env:NUKE_ENTERPRISE_TOKEN > $null
+}
+
ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }
diff --git a/build.sh b/build.sh
index 75341232..a226b969 100755
--- a/build.sh
+++ b/build.sh
@@ -14,11 +14,10 @@ TEMP_DIRECTORY="$SCRIPT_DIR//.nuke/temp"
DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json"
DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh"
-DOTNET_CHANNEL="Current"
+DOTNET_CHANNEL="STS"
export DOTNET_CLI_TELEMETRY_OPTOUT=1
-export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
-export DOTNET_MULTILEVEL_LOOKUP=0
+export DOTNET_NOLOGO=1
###########################################################################
# EXECUTION
@@ -54,9 +53,15 @@ else
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path
fi
export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet"
+ export PATH="$DOTNET_DIRECTORY:$PATH"
fi
echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)"
+if [[ ! -z ${NUKE_ENTERPRISE_TOKEN+x} && "$NUKE_ENTERPRISE_TOKEN" != "" ]]; then
+ "$DOTNET_EXE" nuget remove source "nuke-enterprise" &>/dev/null || true
+ "$DOTNET_EXE" nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password "$NUKE_ENTERPRISE_TOKEN" --store-password-in-clear-text &>/dev/null || true
+fi
+
"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@"
diff --git a/nuke/Build.cs b/nuke/Build.cs
index a186fdf3..bb7f437c 100644
--- a/nuke/Build.cs
+++ b/nuke/Build.cs
@@ -14,8 +14,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using static Nuke.Common.IO.FileSystemTasks;
-using static Nuke.Common.IO.PathConstruction;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Nuke.Common.Tools.NuGet.NuGetTasks;
using Project = Nuke.Common.ProjectModel.Project;
@@ -99,7 +97,7 @@ protected override void OnBuildInitialized()
Log.Information("Building version: {Version}", Version);
- TargetProject = Solution.GetProject(SourceDirectory / TargetProjectName / $"{TargetLibName}.csproj" );
+ TargetProject = Solution.GetProject(TargetLibName);
TargetProject.NotNull("TargetProject could not be loaded!");
TargetFrameworks = TargetProject.GetTargetFrameworks();
@@ -112,7 +110,7 @@ protected override void OnBuildInitialized()
.Before(Restore)
.Executes(() =>
{
- SourceDirectory.GlobDirectories("**/bin", "**/obj").ForEach(DeleteDirectory);
+ SourceDirectory.GlobDirectories("**/bin", "**/obj").ForEach(x => x.DeleteDirectory());
});
Target Restore => _ => _
@@ -152,14 +150,14 @@ protected override void OnBuildInitialized()
var targetDir = NugetDirectory / "lib" / item;
var srcDir = BuildDirectory / item;
- CopyFile(srcDir / $"{TargetProjectName}.dll", targetDir / $"{TargetProjectName}.dll", FileExistsPolicy.OverwriteIfNewer);
- CopyFile(srcDir / $"{TargetProjectName}.pdb", targetDir / $"{TargetProjectName}.pdb", FileExistsPolicy.OverwriteIfNewer);
- CopyFile(srcDir / $"{TargetProjectName}.xml", targetDir / $"{TargetProjectName}.xml", FileExistsPolicy.OverwriteIfNewer);
+ (srcDir / $"{TargetProjectName}.dll").Copy(targetDir / $"{TargetProjectName}.dll", ExistsPolicy.FileOverwriteIfNewer);
+ (srcDir / $"{TargetProjectName}.pdb").Copy(targetDir / $"{TargetProjectName}.pdb", ExistsPolicy.FileOverwriteIfNewer);
+ (srcDir / $"{TargetProjectName}.xml").Copy(targetDir / $"{TargetProjectName}.xml", ExistsPolicy.FileOverwriteIfNewer);
}
- CopyFile(SourceDirectory / $"{TargetProjectName}.nuspec", NugetDirectory / $"{TargetProjectName}.nuspec", FileExistsPolicy.OverwriteIfNewer);
- CopyFile(RootDirectory / "logo.png", NugetDirectory / "logo.png", FileExistsPolicy.OverwriteIfNewer);
- CopyFile(RootDirectory / "README.md", NugetDirectory / "README.md", FileExistsPolicy.OverwriteIfNewer);
+ (SourceDirectory / $"{TargetProjectName}.nuspec").Copy(NugetDirectory / $"{TargetProjectName}.nuspec", ExistsPolicy.FileOverwriteIfNewer);
+ (RootDirectory / "logo.png").Copy(NugetDirectory / "logo.png", ExistsPolicy.FileOverwriteIfNewer);
+ (RootDirectory / "README.md").Copy(NugetDirectory / "README.md", ExistsPolicy.FileOverwriteIfNewer);
});
Target CreatePackage => _ => _
@@ -191,7 +189,7 @@ protected override void OnBuildInitialized()
throw new BuildAbortedException("Could not resolve the NuGet API key.");
}
- foreach (var nupkg in GlobFiles(NugetDirectory, "*.nupkg"))
+ foreach (var nupkg in NugetDirectory.GlobFiles("*.nupkg"))
{
NuGetPush(s => s
.SetTargetPath(nupkg)
diff --git a/nuke/_build.csproj b/nuke/_build.csproj
index 7521e1ba..4c5a47af 100644
--- a/nuke/_build.csproj
+++ b/nuke/_build.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net10.0
CS0649;CS0169
..
@@ -11,7 +11,7 @@
-
+
diff --git a/src/AngleSharp.Css.Tests/AngleSharp.Css.Tests.csproj b/src/AngleSharp.Css.Tests/AngleSharp.Css.Tests.csproj
index abbfe510..078fa889 100644
--- a/src/AngleSharp.Css.Tests/AngleSharp.Css.Tests.csproj
+++ b/src/AngleSharp.Css.Tests/AngleSharp.Css.Tests.csproj
@@ -1,6 +1,6 @@
- net6.0
+ net8.0
true
Key.snk
false
diff --git a/src/AngleSharp.Css.sln b/src/AngleSharp.Css.sln
index ce2248b2..a46c8c7c 100644
--- a/src/AngleSharp.Css.sln
+++ b/src/AngleSharp.Css.sln
@@ -16,10 +16,11 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{988B2C40-782B-4128-9551-7AE65B60F903}"
ProjectSection(SolutionItems) = preProject
AngleSharp.Css.nuspec = AngleSharp.Css.nuspec
- ..\build.cake = ..\build.cake
Directory.Build.props = Directory.Build.props
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "_build", "..\nuke\_build.csproj", "{B82798E2-2766-4C1E-860C-136F4B3B1185}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -46,6 +47,8 @@ Global
{37F366DB-78D6-485F-9D8C-7C65A4B0186D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{37F366DB-78D6-485F-9D8C-7C65A4B0186D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{37F366DB-78D6-485F-9D8C-7C65A4B0186D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B82798E2-2766-4C1E-860C-136F4B3B1185}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B82798E2-2766-4C1E-860C-136F4B3B1185}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE