diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 86520da..6db0411 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,8 +2,8 @@ name: Build on: pull_request: push: + tags: [ '*.*.*' ] branches: - - main - develop - hotfix/* diff --git a/build.cake b/build.cake index 61a35db..a33bf59 100644 --- a/build.cake +++ b/build.cake @@ -169,7 +169,15 @@ Task("Upload-AppVeyor-Artifacts") Task("Publish-MyGet") .IsDependentOn("Package") - .WithCriteria((AppVeyor.IsRunningOnAppVeyor && !AppVeyor.Environment.PullRequest.IsPullRequest) + .WithCriteria( + ( + AppVeyor.IsRunningOnAppVeyor && + !AppVeyor.Environment.PullRequest.IsPullRequest && + ( + !AppVeyor.Environment.Repository.Branch.Equals("master", StringComparison.OrdinalIgnoreCase) || + AppVeyor.Environment.Repository.Tag.IsTag + ) + ) || StringComparer.OrdinalIgnoreCase.Equals(target, "Publish-MyGet")) .Does(() => {