diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 78f67c67..a515d1f0 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,8 +11,7 @@ updates: interval: weekly - package-ecosystem: nuget - directories: - - "/" + directories: - "/src" schedule: interval: daily diff --git a/deployment/cake/lib-msbuild.cake b/deployment/cake/lib-msbuild.cake index c365f5b2..76225458 100644 --- a/deployment/cake/lib-msbuild.cake +++ b/deployment/cake/lib-msbuild.cake @@ -1,5 +1,5 @@ -#addin "nuget:?package=Cake.Issues&version=4.12.0" -#addin "nuget:?package=Cake.Issues.MsBuild&version=4.12.0" +#addin "nuget:?package=Cake.Issues&version=5.0.0" +#addin "nuget:?package=Cake.Issues.MsBuild&version=5.0.0" #addin "nuget:?package=System.Configuration.ConfigurationManager&version=9.0.0" #tool "nuget:?package=MSBuild.Extension.Pack&version=1.9.1" diff --git a/deployment/cake/lib-signing.cake b/deployment/cake/lib-signing.cake index 0c3bef6d..5ce96eab 100644 --- a/deployment/cake/lib-signing.cake +++ b/deployment/cake/lib-signing.cake @@ -49,7 +49,13 @@ public static void SignFilesInDirectory(BuildContext buildContext, string direct var codeSignContext = buildContext.General.CodeSign; var azureCodeSignContext = buildContext.General.AzureCodeSign; - var certificateSubjectName = buildContext.General.CodeSign.CertificateSubjectName; + if (buildContext.General.IsLocalBuild || + buildContext.General.IsCiBuild) + { + // Never code-sign local or ci builds + return; + } + if (!codeSignContext.IsAvailable && !azureCodeSignContext.IsAvailable) { @@ -259,6 +265,13 @@ public static void SignNuGetPackage(BuildContext buildContext, string fileName) return; } + if (!codeSignContext.IsAvailable && + !azureCodeSignContext.IsAvailable) + { + buildContext.CakeContext.Information("Skipping code signing because none of the options is available"); + return; + } + buildContext.CakeContext.Information($"Signing NuGet package '{fileName}'"); if (azureCodeSignContext.IsAvailable)