1818
1919[ ShutdownDotNetAfterServerBuild ]
2020[ DotNetVerbosityMapping ]
21- [ GitHubActions (
22- "continuous" ,
23- GitHubActionsImage . WindowsLatest ,
24- AutoGenerate = false ,
25- OnPullRequestBranches = new [ ] { MasterBranch , ReleaseBranch } ,
26- PublishArtifacts = false ,
27- InvokedTargets = new [ ] { nameof ( Verify ) , nameof ( Cover ) , nameof ( Pack ) } ) ]
28- [ GitHubActions (
29- "release" ,
30- GitHubActionsImage . WindowsLatest ,
31- AutoGenerate = false ,
32- OnPushTags = new [ ] { "v*" } ,
33- PublishArtifacts = true ,
34- InvokedTargets = new [ ] { nameof ( Verify ) , nameof ( Cover ) , nameof ( Publish ) } ,
35- ImportSecrets = new [ ] { Secrets . NuGetApiKey } ) ]
3621partial class Build : NukeBuild
3722{
3823 public static int Main ( ) => Execute < Build > ( x => x . Compile ) ;
@@ -50,9 +35,6 @@ partial class Build : NukeBuild
5035
5136 [ Parameter ( "Forces the continuous integration build flag" ) ] readonly bool CI ;
5237
53- [ Secret ] [ Parameter ( "NuGet API Key (secret)" , Name = Secrets . NuGetApiKey ) ] readonly string NuGetApiKey ;
54- readonly string NuGetSource = "https://api.nuget.org/v3/index.json" ;
55-
5638 IEnumerable < Project > Excluded => new [ ]
5739 {
5840 Solution . GetProject ( "_build" ) ,
@@ -208,24 +190,4 @@ partial class Build : NukeBuild
208190 . Add ( "/p:CheckEolTargetFramework=false" ) )
209191 . CombineWith ( FSharpLibraries , ( s , p ) => s . SetProject ( p ) ) ) ;
210192 } ) ;
211-
212- Target Publish => _ => _
213- . DependsOn ( Pack )
214- . Consumes ( Pack )
215- . Executes ( ( ) =>
216- {
217- DotNetNuGetPush ( s => s
218- . EnableSkipDuplicate ( )
219- . When (
220- GitHubActions . IsOnSemVerTag ( ) ,
221- v => v
222- . SetApiKey ( NuGetApiKey )
223- . SetSource ( NuGetSource ) )
224- . CombineWith ( Packages , ( _ , p ) => _ . SetTargetPath ( p ) ) ) ;
225- } ) ;
226-
227- public static class Secrets
228- {
229- public const string NuGetApiKey = "NUGET_API_KEY" ;
230- }
231193}
0 commit comments