8000 Adds CI build with github actions · DNNCommunity/Dnn.ModuleCreator@1439d81 · GitHub
[go: up one dir, main page]

Skip to c 8000 ontent

Commit 1439d81

Browse files
committed
Adds CI build with github actions
1 parent af56e0e commit 1439d81

File tree

2 files changed

+61
-1
lines changed

2 files changed

+61
-1
lines changed

.github/workflows/Build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# ------------------------------------------------------------------------------
2+
# <auto-generated>
3+
#
4+
# This code was generated.
5+
#
6+
# - To turn off auto-generation set:
7+
#
8+
# [GitHubActions (AutoGenerate = false)]
9+
#
10+
# - To trigger manual generation invoke:
11+
#
12+
# nuke --generate-configuration GitHubActions_Build --host GitHubActions
13+
#
14+
# </auto-generated>
15+
# ------------------------------------------------------------------------------
16+
17+
name: Build
18+
19+
on:
20+
push:
21+
branches:
22+
- main
23+
- release/**
24+
pull_request:
25+
branches:
26+
- develop
27+
- release/**
28+
29+
jobs:
30+
windows-latest:
31+
name: windows-latest
32+
runs-on: windows-latest
33+
steps:
34+
- uses: actions/checkout@v1
35+
- name: Run './build.cmd CI'
36+
run: ./build.cmd CI
37+
env:
38+
githubtoken: ${{ secrets.GITHUB_TOKEN }}
39+
- uses: actions/upload-artifact@v1
40+
with:
41+
name: Artifacts
42+
path: Artifacts

build/Build.cs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Xml;
77
using BuildHelpers;
88
using Nuke.Common;
9+
using Nuke.Common.CI.GitHubActions;
910
using Nuke.Common.Execution;
1011
using Nuke.Common.Git;
1112
using Nuke.Common.IO;
@@ -23,7 +24,15 @@
2324
using static Nuke.Common.Tools.DotNet.DotNetTasks;
2425
using static Nuke.Common.Tools.Git.GitTasks;
2526
using static Nuke.Common.Tools.MSBuild.MSBuildTasks;
26-
27+
using Nuke.Common.CI;
28+
29+
[GitHubActions(
30+
name: "Build",
31+
image: GitHubActionsImage.WindowsLatest,
32+
ImportGitHubTokenAs = "githubtoken",
33+
InvokedTargets = new[] { "CI" },
34+
OnPullRequestBranches = new[] { "develop", "release/**" },
35+
OnPushBranches = new[] { "main", "release/**" })]
2736
[CheckBuildProjectConfigurations]
2837
class Build : NukeBuild
2938
{
@@ -153,6 +162,7 @@ public Build()
153162
.DependsOn(Compile)
154163
.DependsOn(SetBranch)
155164
.DependsOn(TagRelease)
165+
.Produces(ArtifactsDirectory / "*.zip")
156166
.Executes(() =>
157167
{
158168
EnsureCleanDirectory(StagingDirectory);
@@ -222,4 +232,12 @@ public Build()
222232
excludeDirectory: d => excludedFolders.Contains(d.Name),
223233
excludeFile: f => excludedExtensions.Contains(f.Extension));
224234
});
235+
236+
Target CI => _ => _
237+
.DependsOn(Package)
238+
.DependsOn(TagRelease)
239+
.Executes(() =>
240+
{
241+
242+
});
225243
}

0 commit comments

Comments
 (0)
0