11using  System . Collections . Generic ; 
22using  System . Linq ; 
33using  Nuke . Common . CI . GitHubActions ; 
4- using  Rocket . Surgery . Nuke ; 
54using  Rocket . Surgery . Nuke . ContinuousIntegration ; 
65using  Rocket . Surgery . Nuke . DotNetCore ; 
76using  Rocket . Surgery . Nuke . GithubActions ; 
87
9- [ AzurePipelinesSteps ( 
10-     AutoGenerate  =  false , 
11-     InvokeTargets  =  new [ ]  {  nameof ( Default )  } , 
12-     NonEntryTargets  =  new [ ]  { 
13-         nameof ( ICIEnvironment . CIEnvironment ) , 
14-         nameof ( ITriggerCodeCoverageReports . TriggerCodeCoverageReports ) , 
15-         nameof ( ITriggerCodeCoverageReports . GenerateCodeCoverageReportCobertura ) , 
16-         nameof ( IGenerateCodeCoverageBadges . GenerateCodeCoverageBadges ) , 
17-         nameof ( IGenerateCodeCoverageReport . GenerateCodeCoverageReport ) , 
18-         nameof ( IGenerateCodeCoverageSummary . GenerateCodeCoverageSummary ) , 
19-         nameof ( Default ) 
20-     } , 
21-     ExcludedTargets  =  new [ ] 
22-         {  nameof ( ICanClean . Clean ) ,  nameof ( ICanRestoreWithDotNetCore . Restore ) ,  nameof ( ICanRestoreWithDotNetCore . DotnetToolRestore )  } , 
23-     Parameters  =  new [ ]  { 
24-         nameof ( IHaveCodeCoverage . CoverageDirectory ) ,  nameof ( IHaveOutputArtifacts . ArtifactsDirectory ) ,  nameof ( Verbosity ) , 
25-         nameof ( IHaveConfiguration . Configuration ) 
26-     } 
27- ) ] 
288[ GitHubActionsSteps ( 
299    "ci" , 
3010    GitHubActionsImage . MacOsLatest , 
@@ -64,8 +44,10 @@ public static RocketSurgeonGitHubActionsConfiguration Middleware(RocketSurgeonGi
6444        checkoutStep . FetchDepth  =  0 ; 
6545        buildJob . Environment [ "NUGET_PACKAGES" ]  =  "${{ github.workspace }}/.nuget/packages" ; 
6646        buildJob . Steps . InsertRange ( 
67-             buildJob . Steps . IndexOf ( checkoutStep )  +  1 ,  new  BaseGitHubActionsStep [ ]  { 
68-                 new  RunStep ( "Fetch all history for all tags and branches" )  { 
47+             buildJob . Steps . IndexOf ( checkoutStep )  +  1 ,  new  BaseGitHubActionsStep [ ] 
48+             { 
49+                 new  RunStep ( "Fetch all history for all tags and branches" ) 
50+                 { 
6951                    Run  =  "git fetch --prune" 
7052                } , 
7153                new  UsingStep ( "NuGet Cache" ) 
@@ -81,51 +63,59 @@ public static RocketSurgeonGitHubActionsConfiguration Middleware(RocketSurgeonGi
8163              ${{ runner.os }}-nuget-" 
8264                    } 
8365                } , 
84-                 new  SetupDotNetStep ( "Use .NET Core 3.1 SDK" )  { 
66+                 new  SetupDotNetStep ( "Use .NET Core 3.1 SDK" ) 
67+                 { 
8568                    DotNetVersion  =  "3.1.x" 
8669                } , 
87-                 new  SetupDotNetStep ( "Use .NET Core 6.0 SDK" )  { 
70+                 new  SetupDotNetStep ( "Use .NET Core 6.0 SDK" ) 
71+                 { 
8872                    DotNetVersion  =  "6.0.x" 
8973                } , 
9074            } 
9175        ) ; 
9276
9377        buildJob . Steps . Add ( 
94-             new  UsingStep ( "Publish Coverage" )  { 
78+             new  UsingStep ( "Publish Coverage" ) 
79+             { 
9580                Uses  =  "codecov/codecov-action@v1" , 
96-                 With  =  new  Dictionary < string ,  string >  { 
81+                 With  =  new  Dictionary < string ,  string > 
82+                 { 
9783                    [ "name" ]  =  "actions-${{ matrix.os }}" , 
9884                    [ "fail_ci_if_error" ]  =  "true" , 
9985                } 
10086            } 
10187        ) ; 
10288
10389        buildJob . Steps . Add ( 
104-             new  UploadArtifactStep ( "Publish logs" )  { 
90+             new  UploadArtifactStep ( "Publish logs" ) 
91+             { 
10592                Name  =  "logs" , 
10693                Path  =  "artifacts/logs/" , 
10794                If  =  "always()" 
10895            } 
10996        ) ; 
11097
11198        buildJob . Steps . Add ( 
112-             new  UploadArtifactStep ( "Publish coverage data" )  { 
99+             new  UploadArtifactStep ( "Publish coverage data" ) 
100+             { 
113101                Name  =  "coverage" , 
114102                Path  =  "coverage/" , 
115103                If  =  "always()" 
116104            } 
117105        ) ; 
118106
119107        buildJob . Steps . Add ( 
120-             new  UploadArtifactStep ( "Publish test data" )  { 
108+             new  UploadArtifactStep ( "Publish test data" ) 
109+             { 
121110                Name  =  "test data" , 
122111                Path  =  "artifacts/test/" , 
123112                If  =  "always()" 
124113            } 
125114        ) ; 
126115
127116        buildJob . Steps . Add ( 
128-             new  UploadArtifactStep ( "Publish NuGet Packages" )  { 
117+             new  UploadArtifactStep ( "Publish NuGet Packages" ) 
118+             { 
129119                Name  =  "nuget" , 
130120                Path  =  "artifacts/nuget/" , 
131121                If  =  "always()" 
0 commit comments