Skip to content

Commit 3e9b88f

Browse files
Package nuget packages and publish to appveyor artifacts
1 parent c55f441 commit 3e9b88f

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

.appveyor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ after_build:
66
- "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%"
77
- pip install codecov
88
- codecov -f "./artifacts/coverage/coverage.xml"
9+
artifacts:
10+
- path: ./artifacts/nuget/*.nupkg

build.cake

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,33 @@ Task("Coverage")
123123
System.IO.File.WriteAllText(artifacts + "/coverage/coverage.xml", withBom.Replace(_byteOrderMarkUtf8, ""));
124124
});
125125

126-
Task("GitVersion")
126+
Task("Pack")
127+
.IsDependentOn("Build")
127128
.Does(() => {
129+
EnsureDirectoryExists(artifacts + "/nuget");
130+
foreach (var project in GetFiles("src/*/*.csproj"))
131+
DotNetCorePack(project.FullPath, new DotNetCorePackSettings
132+
{
133+
NoBuild = true,
134+
Configuration = configuration,
135+
EnvironmentVariables = GitVersionEnvironmentVariables,
136+
OutputDirectory = artifacts + "/nuget"
137+
});
138+
});
128139

140+
Task("GitVersion")
141+
.Does(() => {
142+
GitVersion(new GitVersionSettings() {
143+
OutputType = GitVersionOutput.BuildServer
144+
});
129145
});
130146

131147
Task("Default")
148+
.IsDependentOn("GitVersion")
132149
.IsDependentOn("Clean")
133150
.IsDependentOn("Build")
134151
.IsDependentOn("Test")
135-
.IsDependentOn("Coverage");
152+
.IsDependentOn("Coverage")
153+
.IsDependentOn("Pack");
136154

137155
RunTarget(target);

0 commit comments

Comments
 (0)