File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 28
28
job :
29
29
- os : windows-2019
30
30
build : ./build.cmd
31
+ push : true
31
32
name : ${{ matrix.job.os }}
32
33
runs-on : ${{ matrix.job.os }}
33
34
steps :
42
43
fetch-depth : 0
43
44
- name : Build
44
45
run : ${{ matrix.job.build }} --verbosity=diagnostic --target=pack
46
+ - name : Publish artifacts
47
+ if : matrix.job.push && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
48
+ uses : actions/upload-artifact@v2.2.4
49
+ with :
50
+ if-no-files-found : warn
51
+ name : package
52
+ path : artifact/nuget/**/*
Original file line number Diff line number Diff line change @@ -30,4 +30,4 @@ Thumbs.db
30
30
31
31
# cake
32
32
.cake /
33
- /artifacts /*
33
+ /artifact /*
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ var buildVersion = MinVer(s => s.WithTagPrefix("v").WithDefaultPreReleasePhase("
9
9
Task ( "clean" )
10
10
. Does ( ( ) =>
11
11
{
12
- CleanDirectories ( "./artifacts /**" ) ;
12
+ CleanDirectories ( "./artifact /**" ) ;
13
13
CleanDirectories ( "./packages/**" ) ;
14
14
CleanDirectories ( "./**/^{bin,obj}" ) ;
15
15
} ) ;
@@ -69,10 +69,10 @@ Task("pack")
69
69
NoBuild = true ,
70
70
IncludeSymbols = true ,
71
71
IncludeSource = true ,
72
- OutputDirectory = "./artifacts /nuget" ,
73
- ArgumentCustomization = args =>
74
- args . AppendQuoted ( $ "-p: Version= { buildVersion . Version } " )
75
- . AppendQuoted ( $ "-p: PackageReleaseNotes= { releaseNotes } " )
72
+ OutputDirectory = "./artifact /nuget" ,
73
+ MSBuildSettings = new DotNetCoreMSBuildSettings ( )
74
+ . WithProperty ( " Version" , buildVersion . Version )
75
+ . WithProperty ( " PackageReleaseNotes" , releaseNotes )
76
76
} ) ;
77
77
} ) ;
78
78
@@ -100,7 +100,7 @@ Task("push")
100
100
ApiKey = apiKey ,
101
101
} ;
102
102
103
- foreach ( var nugetPackageFile in GetFiles ( "./artifacts /nuget/*.nupkg" ) )
103
+ foreach ( var nugetPackageFile in GetFiles ( "./artifact /nuget/*.nupkg" ) )
104
104
{
105
105
DotNetCoreNuGetPush ( nugetPackageFile . FullPath , nugetPushSettings ) ;
106
106
}
You can’t perform that action at this time.
0 commit comments