-
Notifications
You must be signed in to change notification settings - Fork 3
63 lines (47 loc) · 1.48 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI/CD
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
ci:
name: Build on ${{ matrix.os }} - ${{ matrix.configuration }}
strategy:
fail-fast: false
matrix:
os: [ windows-latest, macos-latest, ubuntu-latest ]
configuration: [ Debug, Release ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.423
- name: Build WTG.Analyzers
run: dotnet build src --configuration ${{ matrix.configuration }}
- name: Build NuGet Package
run: dotnet pack src --configuration ${{ matrix.configuration }} --no-build -p:CommitID=${{ github.sha }}
- name: Run Tests (net472)
if: matrix.configuration == 'Debug' && matrix.os == 'windows-latest'
run: dotnet test src --no-build --framework net472
- name: Run Tests (net6.0)
if: matrix.configuration == 'Debug'
run: dotnet test src --no-build --framework net6.0
nupkg:
name: Create NuGet Package
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.423
- name: Build NuGet Package
run: dotnet pack src -p:CommitID=${{ github.sha }}
- name: Upload NuGet Package
uses: actions/upload-artifact@v2
with:
name: nuget-packages
path: 'Bin/*.nupkg'