diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c52f45be..a84213862 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,15 @@ on: branches: - master - main + tags: + - 'v*.*.*' + paths: + - '**/*.*' + - '!**/*.md' + pull_request: + paths: + - '**/*.*' + - '!**/*.md' jobs: windows-latest: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b93ee1ffc..fe4802255 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -17,10 +17,17 @@ name: pr on: + push: + paths: + - '**/*.*' + - '!**/*.md' pull_request: branches: - master - main + paths: + - '**/*.*' + - '!**/*.md' jobs: windows-latest: diff --git a/build/Build.CI.GitHubActions.cs b/build/Build.CI.GitHubActions.cs index 674bffd5b..3ec0bb934 100644 --- a/build/Build.CI.GitHubActions.cs +++ b/build/Build.CI.GitHubActions.cs @@ -5,7 +5,11 @@ GitHubActionsImage.WindowsLatest, //GitHubActionsImage.UbuntuLatest, //GitHubActionsImage.MacOsLatest, - OnPullRequestBranches = new [] { "master", "main" }, + OnPullRequestBranches = new[] { "master", "main" }, + OnPushIncludePaths = new[] { "**/*.*" }, + OnPushExcludePaths = new[] { "**/*.md" }, + OnPullRequestIncludePaths = new[] { "**/*.*" }, + OnPullRequestExcludePaths = new[] { "**/*.md" }, PublishArtifacts = false, InvokedTargets = new[] { nameof(Compile), nameof(Test), nameof(Pack) }, CacheKeyFiles = new[] { "global.json", "src/**/*.csproj", "src/**/package.json" }), @@ -15,7 +19,12 @@ GitHubActionsImage.WindowsLatest, //GitHubActionsImage.UbuntuLatest, //GitHubActionsImage.MacOsLatest, - OnPushBranches = new [] { "master", "main" }, + OnPushBranches = new[] { "master", "main" }, + OnPushTags = new[] { "v*.*.*" }, + OnPushIncludePaths = new[] { "**/*.*" }, + OnPushExcludePaths = new[] { "**/*.md" }, + OnPullRequestIncludePaths = new[] { "**/*.*" }, + OnPullRequestExcludePaths = new[] { "**/*.md" }, PublishArtifacts = true, InvokedTargets = new[] { nameof(Compile), nameof(Test), nameof(Pack), nameof(Publish) }, ImportSecrets = new [] { "NUGET_API_KEY", "MYGET_API_KEY" },