File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed
Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ name: pack
1919on : [workflow_dispatch, pull_request]
2020
2121jobs :
22- ubuntu -latest :
23- name : ubuntu -latest
24- runs-on : ubuntu -latest
22+ windows -latest :
23+ name : windows -latest
24+ runs-on : windows -latest
2525 steps :
2626 - uses : actions/checkout@v6
2727 - name : ' Cache: .nuke/temp, ~/.nuget/packages'
3131 .nuke/temp
3232 ~/.nuget/packages
3333 key : ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
34- - name : ' Run: Test, Pack'
35- run : ./build.cmd Test Pack
34+ - name : ' Run: Pack'
35+ run : ./build.cmd Pack
3636 - name : ' Publish: packages'
3737 uses : actions/upload-artifact@v5
3838 with :
Original file line number Diff line number Diff line change 1- [ GitHubActions ( "pack" , GitHubActionsImage . UbuntuLatest ,
2- InvokedTargets = [ nameof ( Test ) , nameof ( Pack ) ] ,
1+ using Nuke . Common . Git ;
2+
3+ [ GitHubActions ( "pack" , GitHubActionsImage . WindowsLatest ,
4+ InvokedTargets = [ nameof ( Pack ) ] ,
35 AutoGenerate = true ,
6+ PublishArtifacts = true ,
47 On =
58 [
69 GitHubActionsTrigger . WorkflowDispatch ,
710 GitHubActionsTrigger . PullRequest
811 ] ) ]
912class Build : NukeBuild
1013{
14+ [ GitRepository ]
15+ readonly GitRepository GitRepository ;
16+
1117 [ Solution ( GenerateProjects = true ) ]
1218 readonly Solution Solution ;
1319
1420 [ Parameter ( "Configuration to build - Default is 'Debug' (local) or 'Release' (server)" ) ]
1521 readonly Configuration Configuration = IsLocalBuild ? Configuration . Debug : Configuration . Release ;
1622
17- public static int Main ( ) => Execute < Build > ( x => x . Test , x => x . Pack ) ;
23+ public static int Main ( ) => Execute < Build > ( x => x . Pack ) ;
1824
1925 Target Clean => _ => _
2026 . Executes ( ( ) =>
@@ -23,6 +29,7 @@ class Build : NukeBuild
2329 } ) ;
2430
2531 Target Pack => _ => _
32+ . DependsOn ( Test )
2633 . Produces ( PackagesDirectory / "*.nupkg" )
2734 . Executes ( ( ) =>
2835 {
@@ -33,6 +40,7 @@ class Build : NukeBuild
3340 } ) ;
3441
3542 Target Test => _ => _
43+ . OnlyWhenStatic ( ( ) => IsWin )
3644 . Executes ( ( ) =>
3745 {
3846 DotNetTasks . DotNetPublish ( options => options
You can’t perform that action at this time.
0 commit comments