Skip to content

Commit ff0f6a7

Browse files
authored
Add GitHub build action (#1640)
1 parent 9b77349 commit ff0f6a7

File tree

3 files changed

+47
-3
lines changed

3 files changed

+47
-3
lines changed

.github/workflows/pr.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Fluent Assertions - Pull Requests
2+
3+
on:
4+
push:
5+
branches: [ develop, release-6.0 ]
6+
pull_request:
7+
branches: [ develop, release-6.0 ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: windows-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Setup .NET 5
20+
uses: actions/setup-dotnet@v1
21+
with:
22+
dotnet-version: 5.0.x
23+
24+
- name: Setup .NET 3.1
25+
uses: actions/setup-dotnet@v1
26+
with:
27+
dotnet-version: 3.1.x
28+
29+
- name: Setup .NET 2.1
30+
uses: actions/setup-dotnet@v1
31+
with:
32+
dotnet-version: 2.1.x
33+
34+
- name: Install NUKE
35+
run: |
36+
dotnet tool install --global Nuke.GlobalTool
37+
38+
- name: Run NUKE
39+
run: nuke
40+
41+
- name: Upload artifacts
42+
uses: actions/upload-artifact@v2
43+
with:
44+
path: ./Artifacts/*

Build/Build.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Build : NukeBuild
2727
public static int Main() => Execute<Build>(x => x.Pack);
2828

2929
[Solution(GenerateProjects = true)] readonly Solution Solution;
30-
[GitVersion] readonly GitVersion GitVersion;
30+
[GitVersion(Framework = "net5.0")] readonly GitVersion GitVersion;
3131
[PackageExecutable("nspec", "NSpecRunner.exe", Version = "3.1.0")] Tool NSpec3;
3232

3333
AbsolutePath ArtifactsDirectory => RootDirectory / "Artifacts";

Build/_build.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
<NukeScriptDirectory>..\</NukeScriptDirectory>
99
</PropertyGroup>
1010
<ItemGroup>
11-
<PackageDownload Include="GitVersion.Tool" Version="[5.1.2]" />
11+
<PackageDownload Include="GitVersion.Tool" Version="[5.6.11]" />
1212
<PackageDownload Include="NSpec" Version="[3.1.0]" />
1313
<PackageDownload Include="xunit.runner.console" Version="[2.4.1]" />
1414
<PackageReference Include="Nuke.Common" Version="5.1.0" />
1515
</ItemGroup>
16-
</Project>
16+
</Project>

0 commit comments

Comments
 (0)