Update publish.yml

This commit is contained in:
Marko Lahma
2022-12-07 09:16:48 +02:00
parent 4567de0895
commit 571febbe3f
2 changed files with 4 additions and 4 deletions

View File

@@ -11,8 +11,6 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Publish
run: ./build.cmd test publish
env:

View File

@@ -15,8 +15,10 @@ public partial class Build
string TagVersion => GitRepository.Tags.SingleOrDefault(x => x.StartsWith("v"))?[1..];
bool IsTaggedBuild => !string.IsNullOrWhiteSpace(TagVersion);
Target Publish => _ => _
.OnlyWhenDynamic(() => GitRepository.IsOnMainBranch() && !string.IsNullOrWhiteSpace(TagVersion))
.OnlyWhenDynamic(() => GitRepository.IsOnMainBranch() && IsTaggedBuild)
.DependsOn(Pack)
.Requires(() => NuGetApiKey)
.Executes(() =>
@@ -44,4 +46,4 @@ public partial class Build
bool PushCompleteOnFailure => true;
int PushDegreeOfParallelism => 5;
}
}