Skip to content

Commit 18d1d88

Browse files
Add GHA build workflow
1 parent a79488e commit 18d1d88

File tree

3 files changed

+50
-6
lines changed

3 files changed

+50
-6
lines changed

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
- develop
6+
- "feature/**"
7+
- "release/**"
8+
- "hotfix/**"
9+
tags:
10+
- "*.*.*"
11+
paths-ignore:
12+
- "README.md"
13+
14+
pull_request:
15+
16+
workflow_dispatch:
17+
18+
env:
19+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
20+
DOTNET_CLI_TELEMETRY_OPTOUT: true
21+
DOTNET_NOLOGO: true
22+
23+
jobs:
24+
build:
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
job:
29+
- os: windows-2019
30+
build: ./build.cmd
31+
name: ${{ matrix.job.os }}
32+
runs-on: ${{ matrix.job.os }}
33+
steps:
34+
- name: Setup net5.0
35+
uses: actions/setup-dotnet@v1.7.2
36+
with:
37+
dotnet-version: "5.0.201"
38+
- name: Run dotnet --info
39+
run: dotnet --info
40+
- uses: actions/checkout@v2.3.4
41+
with:
42+
fetch-depth: 0
43+
- name: Build
44+
run: ${{ matrix.job.build }} --verbosity=diagnostic --target=pack

build.cake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#tool "nuget:?package=NuGet.CommandLine&version=5.8.1"
2+
13
#addin "nuget:?package=Cake.MinVer&version=1.0.0"
24
#addin "nuget:?package=Cake.Args&version=1.0.0"
35

@@ -8,19 +10,17 @@ Task("clean")
810
.Does(() =>
911
{
1012
CleanDirectories("./artifacts/**");
11-
CleanDirectories("./src/**/bin");
12-
CleanDirectories("./src/**/obj");
13-
CleanDirectories("./test/**/bin");
14-
CleanDirectories("./test/**/obj");
13+
CleanDirectories("./packages/**");
14+
CleanDirectories("./**/^{bin,obj}");
1515
});
1616

1717
Task("restore")
1818
.IsDependentOn("clean")
1919
.Does(() =>
2020
{
21-
DotNetCoreRestore("./serilog-enrichers-exceldna.sln", new DotNetCoreRestoreSettings
21+
NuGetRestore("./serilog-enrichers-exceldna.sln", new NuGetRestoreSettings
2222
{
23-
LockedMode = true,
23+
NoCache = true,
2424
});
2525
});
2626

build.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)