From 18b0f3fca272c2ab85f08b53a1d183516eb2400b Mon Sep 17 00:00:00 2001 From: AdmiringWorm Date: Tue, 15 Sep 2020 10:32:04 +0200 Subject: [PATCH] (build) Change to publish tags on appveyor --- .github/workflows/build.yml | 2 -- recipe.cake | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 39c3218..7ee89fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,8 +8,6 @@ on: - "release/**" - "hotfix/**" - "feature/**" - tags: - - '*' paths-ignore: - "README.md" pull_request: diff --git a/recipe.cake b/recipe.cake index 92e4e46..35a7f00 100644 --- a/recipe.cake +++ b/recipe.cake @@ -3,6 +3,17 @@ Environment.SetVariableNames(); +var platform = PlatformFamily.Linux; +var provider = BuildProviderType.GitHubActions; + +// Because GitVersion do not play nice with GitHub Action, we need to do the publishing +// on appveyor instead +if (HasEnvironmentVariable("APPVEYOR") && EnvironmentVariable("APPVEYOR_REPO_TAG", false)) +{ + platform = PlatformFamily.Windows; + provider = BuildProviderType.AppVeyor; +} + BuildParameters.SetParameters( context: Context, buildSystem: BuildSystem, @@ -18,8 +29,8 @@ BuildParameters.SetParameters( shouldRunCoveralls: false, shouldUseDeterministicBuilds: true, shouldUseTargetFrameworkPath: false, - preferredBuildAgentOperatingSystem: PlatformFamily.Linux, - preferredBuildProviderType: BuildProviderType.GitHubActions); + preferredBuildAgentOperatingSystem: platform, + preferredBuildProviderType: provider); ToolSettings.SetToolSettings(context: Context);