Update publish.yml
This commit is contained in:
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user