-
-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (40 loc) · 1.35 KB
/
build_main.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
---
name: .NET
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore src
- name: Build Debug
run: dotnet build src --no-restore
- name: Test
run: dotnet test src --no-restore --collect:"XPlat Code Coverage"
--results-directory:coverage --
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=lcov
- name: Codecov
env:
CODECOV_TOKEN: ${{secrets.CODECOV_KEY}}
uses: codecov/codecov-action@v2.0.3
with:
directory: ./coverage
- name: Build Blazyload
run: dotnet build src/RonSijm.Blazyload --configuration Release -o "./packages"
- name: Restore dependencies of Blazyload Library
run: dotnet restore src/RonSijm.Blazyload.Library
- name: Build Blazyload Library
run: dotnet build src/RonSijm.Blazyload.Library --configuration Release -o "./packages"
- name: Publish to NuGet
env:
NUGET_API_KEY: ${{secrets.NUGET_API_KEY}}
run: dotnet nuget push -s https://www.nuget.org/api/v2/package -k $NUGET_API_KEY --skip-duplicate
./packages/*.nupkg