-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.17 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
name: Build
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
build:
runs-on: ubuntu-latest
env:
DOTNET_VERSION: '5.0.x'
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core SDK ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --logger trx --results-directory "TestResults-${{ env.DOTNET_VERSION }}"
- name: Upload dotnet test results
uses: actions/upload-artifact@v2
with:
name: dotnet-results-${{ env.DOTNET_VERSION }}
path: TestResults-${{ env.DOTNET_VERSION }}
if: ${{ always() }}
- name: Create the package
run: dotnet pack --configuration Release
- name: Upload package
uses: actions/upload-artifact@v2
with:
name: dotnet-package-${{ env.DOTNET_VERSION }}
path: "*.Package/bin/Release/*.nupkg"