Skip to content

Commit 0d67e8f

Browse files
authored
Merge pull request #13 from rafek1241/feature/update-flow
Update github action flow
2 parents d008e89 + f72b853 commit 0d67e8f

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

.github/workflows/continous-integration.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,3 @@ jobs:
3535
run: ./build.cmd ContinousIntegration
3636
env:
3737
NugetApiKey: ${{ secrets.NugetApiKey }}
38-
- uses: actions/upload-artifact@v1
39-
with:
40-
name: nuget
41-
path: artifacts/nuget

build/Build.cs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Linq;
3+
using Newtonsoft.Json;
34
using Nuke.Common;
45
using Nuke.Common.CI;
56
using Nuke.Common.CI.GitHubActions;
@@ -56,6 +57,7 @@ class Build : NukeBuild
5657
.Before(Restore)
5758
.Executes(() =>
5859
{
60+
Console.WriteLine(JsonConvert.SerializeObject(GitRepository));
5961
SourceDirectory.GlobDirectories("**/bin", "**/obj")
6062
.ForEach(DeleteDirectory);
6163
TestsDirectory.GlobDirectories("**/bin", "**/obj")
@@ -93,17 +95,16 @@ class Build : NukeBuild
9395
.Executes(() =>
9496
{
9597
DotNetTest(s => s
96-
.SetProjectFile(TestsDirectory)
98+
.SetProjectFile(Solution)
9799
.SetConfiguration(Configuration)
98100
.EnableNoBuild()
99101
.EnableNoRestore()
100-
.SetResultsDirectory(TestsResultDirectory)
101102
);
102103
}
103104
);
104105

105106
Target Pack => _ => _
106-
.DependsOn(Compile)
107+
.DependsOn(Test)
107108
.Produces(NugetDestinationDirectory / "*.nupkg")
108109
.Executes(() =>
109110
{
@@ -112,12 +113,21 @@ class Build : NukeBuild
112113
.SetConfiguration(Configuration)
113114
.EnableNoBuild()
114115
.EnableNoRestore()
116+
.SetIncludeSymbols(true)
115117
.SetVersion(GitVersion.NuGetVersionV2)
116118
.SetOutputDirectory(NugetDestinationDirectory)
117119
);
118120
}
119121
);
120122

123+
Target DeployToGithubPackage => _ => _
124+
.DependsOn(Pack)
125+
.Executes(() =>
126+
{
127+
128+
}
129+
);
130+
121131
Target Deploy => _ => _
122132
.DependsOn(Pack)
123133
.OnlyWhenStatic(() => GitRepository.Branch == "refs/heads/master")
@@ -132,6 +142,7 @@ class Build : NukeBuild
132142
.ForEach(x =>
133143
{
134144
DotNetNuGetPush(s => s
145+
.SetTargetPath(x)
135146
.SetSource(NugetApiUrl)
136147
.SetApiKey(NugetApiKey)
137148
.SetSkipDuplicate(true)
@@ -142,5 +153,8 @@ class Build : NukeBuild
142153
);
143154

144155
Target ContinousIntegration => _ => _
156+
.DependsOn(Clean);
157+
158+
Target ContinousDeployment => _ => _
145159
.DependsOn(Deploy);
146160
}

0 commit comments

Comments
 (0)