Skip to content

Commit 571d41c

Browse files
authored
Filter branches that push to nuget (#177)
1 parent 55d211c commit 571d41c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Build.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ foreach ($test in Get-ChildItem test/*.Tests) {
6666

6767
Pop-Location
6868

69-
if ($env:NUGET_API_KEY -and ($NULL -ne $suffix -or $NULL -ne $prefix)) {
69+
if ($env:NUGET_API_KEY `
70+
-and ($NULL -ne $suffix -or $NULL -ne $prefix) `
71+
-and ($env:CI_TARGET_BRANCH -eq "dev" -or $env:CI_TARGET_BRANCH -eq "master")) {
7072
# GitHub Actions will only supply this to branch builds and not PRs. We publish
7173
# builds from any branch this action targets (i.e. master and dev).
7274

0 commit comments

Comments
 (0)