-
Notifications
You must be signed in to change notification settings - Fork 34
58 lines (46 loc) · 1.64 KB
/
build.yml
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
name: Build
on: [workflow_call, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
with:
submodules: recursive
- name: "Setup dotnet"
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: "Build"
run: dotnet build -c Release
- name: "Test"
run: dotnet test -c Release --no-build --collect:"XPlat Code Coverage"
- name: "Publish"
run: dotnet publish -c Release --no-build -p:UseAppHost=false -o dist/Assemblies
- name: "Upload assemblies"
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }} Assemblies
path: dist/Assemblies
- name: "Pack"
run: dotnet pack -c Release --no-build -o dist/NuGet
- name: "Upload packages"
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }} NuGet Packages
path: dist/NuGet
- name: "Generate coverage report"
run: |
dotnet tool install -g dotnet-reportgenerator-globaltool
reportgenerator "-reports:tests/**/TestResults/**/coverage.cobertura.xml" "-targetdir:coverage" "-reporttypes:Html;lcov"
- name: "Upload coverage report"
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }} Coverage Report
path: coverage
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: "coverage/lcov.info"