22using System . Linq ;
33using Nuke . Common ;
44using Nuke . Common . CI . AppVeyor ;
5+ using Nuke . Common . CI . GitHubActions ;
56using Nuke . Common . Execution ;
67using Nuke . Common . Git ;
78using Nuke . Common . IO ;
1011using Nuke . Common . Tools . DotNet ;
1112using Nuke . Common . Tools . GitVersion ;
1213using Nuke . Common . Utilities . Collections ;
14+ using Serilog ;
1315using static Nuke . Common . EnvironmentInfo ;
1416using static Nuke . Common . IO . FileSystemTasks ;
1517using static Nuke . Common . IO . PathConstruction ;
@@ -40,6 +42,15 @@ class Build : NukeBuild
4042 AbsolutePath TestsDirectory => RootDirectory / "test" ;
4143 AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts" ;
4244 AbsolutePath NugetDirectory => ArtifactsDirectory / "nuget" ;
45+ GitHubActions GitHubActions => GitHubActions . Instance ;
46+
47+
48+ Target Print => _ => _
49+ . Executes ( ( ) =>
50+ {
51+ Log . Information ( "Branch = {Branch}" , GitHubActions . Ref ) ;
52+ Log . Information ( "Commit = {Commit}" , GitHubActions . Sha ) ;
53+ } ) ;
4354
4455 Target Clean => _ => _
4556 . Before ( Restore )
@@ -114,14 +125,14 @@ class Build : NukeBuild
114125 . AddProperty ( "PackageLicenseExpression" , "Apache-2.0" )
115126 . AddProperty ( "PackageIcon" , @"PackageIcon.png" )
116127 . SetIncludeSymbols ( true )
117- . SetVersion ( "0.1.0-beta05" /*NuGetVersionCustom*/ )
118- . SetDescription ( "Lightweight rule engine " )
128+ . SetVersion ( "0.1.0-beta06" )
129+ . SetDescription ( "Build dynamic rules and workflows using script " )
119130 . SetPackageTags ( "Simpleflow.NET Workflow RuleEngine DynamicExpressionEvaluator" )
120131 . SetNoDependencies ( true )
121132 . SetOutputDirectory ( ArtifactsDirectory / "nuget" ) ) ;
122133 } ) ;
123134
124- Target Push => _ => _
135+ Target Publish => _ => _
125136 . Requires ( ( ) => NugetApiUrl )
126137 . Requires ( ( ) => NugetApiKey )
127138 . Requires ( ( ) => Configuration . Equals ( Configuration . Release ) )
@@ -141,12 +152,5 @@ class Build : NukeBuild
141152 } ) ;
142153 } ) ;
143154
144- // Target PullRequest
145-
146- //Target Print => _ => _
147- // .Executes(() =>
148- // {
149- // Log.Information("Branch = {Branch}", GitHubActions.Ref);
150- // Log.Information("Commit = {Commit}", GitHubActions.Sha);
151- // });
155+
152156}
0 commit comments