From eb48a5fae80e5d2452e14ef3df54ab8507dba135 Mon Sep 17 00:00:00 2001 From: Marko Lahma Date: Tue, 26 Nov 2024 08:49:25 +0200 Subject: [PATCH] Only run publish when in main repository (#5055) --- build/Build.Publish.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/Build.Publish.cs b/build/Build.Publish.cs index d297dc22f9..925680c8f1 100644 --- a/build/Build.Publish.cs +++ b/build/Build.Publish.cs @@ -8,7 +8,7 @@ using Nuke.Common.Tooling; using Nuke.Common.Tools.Chocolatey; using Nuke.Common.Tools.DotNet; - +using Nuke.Common.Tools.GitHub; using static Nuke.Common.Tools.Chocolatey.ChocolateyTasks; using static Nuke.Common.Tools.DotNet.DotNetTasks; using static Nuke.Common.Tools.Npm.NpmTasks; @@ -29,7 +29,7 @@ public partial class Build string SourceToUse => IsTaggedBuild ? NuGetSource : MyGetGetSource; Target Publish => _ => _ - .OnlyWhenDynamic(() => IsRunningOnWindows && (GitRepository.IsOnMainOrMasterBranch() || IsTaggedBuild)) + .OnlyWhenDynamic(() => IsRunningOnWindows && (GitRepository.IsOnMainOrMasterBranch() || IsTaggedBuild) && GitRepository.GetGitHubOwner() == "RicoSuter") .DependsOn(Pack) .Requires(() => NuGetApiKey, () => MyGetApiKey, () => ChocoApiKey, () => NpmAuthToken) .Executes(() =>