Skip to content

Commit aac79a6

Browse files
committed
Use NUKE for build automation
1 parent e1379c4 commit aac79a6

25 files changed

+718
-162
lines changed

.github/workflows/build.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
- master
23+
- main
24+
tags:
25+
- 'v*.*.*'
26+
paths:
27+
- '**/*.*'
28+
- '!**/*.md'
29+
30+
jobs:
31+
ubuntu-latest:
32+
name: ubuntu-latest
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v2
36+
- name: Cache .nuke/temp, ~/.nuget/packages
37+
uses: actions/cache@v2
38+
with:
39+
path: |
40+
.nuke/temp
41+
~/.nuget/packages
42+
key: ${{ runner.os }}-${{ hashFiles('global.json', 'src/**/*.csproj', 'src/**/package.json') }}
43+
- name: Run './build.cmd Compile Test Pack Publish'
44+
run: ./build.cmd Compile Test Pack Publish
45+
env:
46+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
47+
MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }}
48+
- uses: actions/upload-artifact@v1
49+
with:
50+
name: artifacts
51+
path: artifacts

.github/workflows/dotnet-core.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/pr.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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_pr --host GitHubActions
13+
#
14+
# </auto-generated>
15+
# ------------------------------------------------------------------------------
16+
17+
name: pr
18+
19+
on:
20+
pull_request:
21+
branches:
22+
- master
23+
- main
24+
paths:
25+
- '**/*.*'
26+
- '!**/*.md'
27+
28+
jobs:
29+
windows-latest:
30+
name: windows-latest
31+
runs-on: windows-latest
32+
steps:
33+
- uses: actions/checkout@v2
34+
- name: Cache .nuke/temp, ~/.nuget/packages
35+
uses: actions/cache@v2
36+
with:
37+
path: |
38+
.nuke/temp
39+
~/.nuget/packages
40+
key: ${{ runner.os }}-${{ hashFiles('global.json', 'src/**/*.csproj', 'src/**/package.json') }}
41+
- name: Run './build.cmd Compile Test Pack'
42+
run: ./build.cmd Compile Test Pack
43+
ubuntu-latest:
44+
name: ubuntu-latest
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v2
48+
- name: Cache .nuke/temp, ~/.nuget/packages
49+
uses: actions/cache@v2
50+
with:
51+
path: |
52+
.nuke/temp
53+
~/.nuget/packages
54+
key: ${{ runner.os }}-${{ hashFiles('global.json', 'src/**/*.csproj', 'src/**/package.json') }}
55+
- name: Run './build.cmd Compile Test Pack'
56+
run: ./build.cmd Compile Test Pack

.github/workflows/publish-packages.yml

Lines changed: 0 additions & 90 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,8 @@ appsettings.development.json
1212
*.userprefs
1313

1414
# Build results
15-
[Dd]ebug/
16-
[Dd]ebugPublic/
17-
[Rr]elease/
18-
[Rr]eleases/
19-
[Xx]64/
20-
[Xx]86/
21-
[Bb]uild/
22-
bld/
23-
[Bb]in/
24-
[Oo]bj/
15+
**/bin/**
16+
**/obj/**
2517

2618
# Visual Studio 2015 cache/options directory
2719
.vs/

.nuke/build.schema.json

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Build Schema",
4+
"$ref": "#/definitions/build",
5+
"definitions": {
6+
"build": {
7+
"type": "object",
8+
"properties": {
9+
"Configuration": {
10+
"type": "string",
11+
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
12+
"enum": [
13+
"Debug",
14+
"Release"
15+
]
16+
},
17+
"Continue": {
18+
"type": "boolean",
19+
"description": "Indicates to continue a previously failed build attempt"
20+
},
21+
"Help": {
22+
"type": "boolean",
23+
"description": "Shows the help text for this build assembly"
24+
},
25+
"Host": {
26+
"type": "string",
27+
"description": "Host for execution. Default is 'automatic'",
28+
"enum": [
29+
"AppVeyor",
30+
"AzurePipelines",
31+
"Bamboo",
32+
"Bitbucket",
33+
"Bitrise",
34+
"GitHubActions",
35+
"GitLab",
36+
"Jenkins",
37+
"Rider",
38+
"SpaceAutomation",
39+
"TeamCity",
40+
"Terminal",
41+
"TravisCI",
42+
"VisualStudio",
43+
"VSCode"
44+
]
45+
},
46+
"MyGetApiKey": {
47+
"type": "string",
48+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
49+
},
50+
"NoLogo": {
51+
"type": "boolean",
52+
"description": "Disables displaying the NUKE logo"
53+
},
54+
"NuGetApiKey": {
55+
"type": "string",
56+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
57+
},
58+
"Partition": {
59+
"type": "string",
60+
"description": "Partition to use on CI"
61+
},
62+
"Plan": {
63+
"type": "boolean",
64+
"description": "Shows the execution plan (HTML)"
65+
},
66+
"Profile": {
67+
"type": "array",
68+
"description": "Defines the profiles to load",
69+
"items": {
70+
"type": "string"
71+
}
72+
},
73+
"Root": {
74+
"type": "string",
75+
"description": "Root directory during build execution"
76+
},
77+
"Skip": {
78+
"type": "array",
79+
"description": "List of targets to be skipped. Empty list skips all dependencies",
80+
"items": {
81+
"type": "string",
82+
"enum": [
83+
"Clean",
84+
"Compile",
85+
"Pack",
86+
"Publish",
87+
"Restore",
88+
"Test"
89+
]
90+
}
91+
},
92+
"Solution": {
93+
"type": "string",
94+
"description": "Path to a solution file that is automatically loaded"
95+
},
96+
"Target": {
97+
"type": "array",
98+
"description": "List of targets to be invoked. Default is '{default_target}'",
99+
"items": {
100+
"type": "string",
101+
"enum": [
102+
"Clean",
103+
"Compile",
104+
"Pack",
105+
"Publish",
106+
"Restore",
107+
"Test"
108+
]
109+
}
110+
},
111+
"Verbosity": {
112+
"type": "string",
113+
"description": "Logging verbosity during build execution. Default is 'Normal'",
114+
"enum": [
115+
"Minimal",
116+
"Normal",
117+
"Quiet",
118+
"Verbose"
119+
]
120+
}
121+
}
122+
}
123+
}
124+
}

.nuke/parameters.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "./build.schema.json",
3+
"Solution": "FluentEmail.sln"
4+
}

FluentEmail.sln

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentEmail.Liquid", "src\R
4343
EndProject
4444
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentEmail.Liquid.Tests", "test\FluentEmail.Liquid.Tests\FluentEmail.Liquid.Tests.csproj", "{C8063CBA-D8F3-467A-A75C-63843F0DE862}"
4545
EndProject
46+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{FBF3809D-D89B-4CE4-89D8-3B2A9B7B7F9D}"
47+
EndProject
4648
Global
4749
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4850
Debug|Any CPU = Debug|Any CPU
4951
Release|Any CPU = Release|Any CPU
5052
EndGlobalSection
5153
GlobalSection(ProjectConfigurationPlatforms) = postSolution
54+
{FBF3809D-D89B-4CE4-89D8-3B2A9B7B7F9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
55+
{FBF3809D-D89B-4CE4-89D8-3B2A9B7B7F9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
5256
{386B8AB1-E99A-4E08-83BE-DD1B8C2EE876}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
5357
{386B8AB1-E99A-4E08-83BE-DD1B8C2EE876}.Debug|Any CPU.Build.0 = Debug|Any CPU
5458
{386B8AB1-E99A-4E08-83BE-DD1B8C2EE876}.Release|Any CPU.ActiveCfg = Release|Any CPU

0 commit comments

Comments
 (0)