From 8030ca6065abcd8768d406001631a45eca4f60bf Mon Sep 17 00:00:00 2001 From: Liam Sho Date: Tue, 17 May 2022 17:26:32 +0800 Subject: [PATCH] =?UTF-8?q?perf.=E4=BD=BF=20DevBuild=20=E5=9C=A8=E6=89=80?= =?UTF-8?q?=E6=9C=89=E9=9D=9E=20master=20=E5=88=86=E6=94=AF=E8=BF=90?= =?UTF-8?q?=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dev-build.yml | 4 ++-- src/MeoAssistantBuilder/Build.CI.GitHubActions.DevBuild.cs | 2 +- src/MeoAssistantBuilder/BuildParameters.cs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index 882f878d7d..cf7bf21311 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -18,8 +18,8 @@ name: dev-build on: push: - branches: - - dev + branches-ignore: + - master paths: - 'src/MeoAssistant/**' - 'src/MeoAssistantBuilder/**' diff --git a/src/MeoAssistantBuilder/Build.CI.GitHubActions.DevBuild.cs b/src/MeoAssistantBuilder/Build.CI.GitHubActions.DevBuild.cs index 7d94897db7..0c9dea4bc5 100644 --- a/src/MeoAssistantBuilder/Build.CI.GitHubActions.DevBuild.cs +++ b/src/MeoAssistantBuilder/Build.CI.GitHubActions.DevBuild.cs @@ -5,7 +5,7 @@ namespace MeoAssistantBuilder; [GitHubActions( name: "dev-build", image: GitHubActionsImage.WindowsLatest, - OnPushBranches = new[] { DevBranch }, + OnPushBranchesIgnore = new[] { MasterBranch }, OnPullRequestBranches = new[] { DevBranch }, OnPushIncludePaths = new[] { diff --git a/src/MeoAssistantBuilder/BuildParameters.cs b/src/MeoAssistantBuilder/BuildParameters.cs index 2af143037f..5d9220b45e 100644 --- a/src/MeoAssistantBuilder/BuildParameters.cs +++ b/src/MeoAssistantBuilder/BuildParameters.cs @@ -195,7 +195,7 @@ public partial class Build IsFork = true; } - // 若是 DevBuild,Branch 必须为 Dev,或者是 PR,又或者是手动触发 + // 若是 DevBuild,Branch 必须不为 Master,或者是 PR 至 Dev,又或者是手动触发 if (GhActionName == ActionConfiguration.DevBuild) { if (IsWorkflowDispatch) @@ -208,7 +208,7 @@ public partial class Build } else { - Assert.True(GhBranch == DevBranch, "DevBuild -> Auto Triggered,Branch 不为 dev"); + Assert.True(GhBranch != MasterBranch, "DevBuild -> Auto Triggered,Branch 为 master"); } }