File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11
11
runs-on : windows-latest
12
12
steps :
13
13
- uses : actions/checkout@v3
14
- with :
15
- fetch-depth : 0
16
14
- name : Publish
17
15
run : ./build.cmd test publish
18
16
env :
Original file line number Diff line number Diff line change @@ -15,8 +15,10 @@ public partial class Build
15
15
16
16
string TagVersion => GitRepository . Tags . SingleOrDefault ( x => x . StartsWith ( "v" ) ) ? [ 1 ..] ;
17
17
18
+ bool IsTaggedBuild => ! string . IsNullOrWhiteSpace ( TagVersion ) ;
19
+
18
20
Target Publish => _ => _
19
- . OnlyWhenDynamic ( ( ) => GitRepository . IsOnMainBranch ( ) && ! string . IsNullOrWhiteSpace ( TagVersion ) )
21
+ . OnlyWhenDynamic ( ( ) => GitRepository . IsOnMainBranch ( ) && IsTaggedBuild )
20
22
. DependsOn ( Pack )
21
23
. Requires ( ( ) => NuGetApiKey )
22
24
. Executes ( ( ) =>
@@ -44,4 +46,4 @@ public partial class Build
44
46
bool PushCompleteOnFailure => true ;
45
47
int PushDegreeOfParallelism => 5 ;
46
48
47
- }
49
+ }
You can’t perform that action at this time.
0 commit comments