Skip to content

Commit

Permalink
Only run publish when in main repository (#5055)
Browse files Browse the repository at this point in the history
  • Loading branch information
lahma authored Nov 26, 2024
1 parent 29eef8f commit eb48a5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/Build.Publish.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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(() =>
Expand Down

0 comments on commit eb48a5f

Please sign in to comment.