-
Notifications
You must be signed in to change notification settings - Fork 16
61 lines (49 loc) · 1.39 KB
/
ci.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
59
60
61
name: CI
on:
- push
- pull_request
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- windows-latest
- ubuntu-latest
env:
DOTNET_NOLOGO: "true"
DOTNET_CLI_TELEMETRY_OPTOUT: "true"
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "true"
steps:
- name: ⏬ Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 🔽 Setup dotnet from global.json
uses: actions/setup-dotnet@v3
- name: 🔍 Print dotnet info
run: dotnet --info
- name: 🔽 Restore
run: dotnet restore -p:Configuration=Release
- name: 🔨 Build
run: dotnet build --configuration Release
- name: 🧪 Test
run: dotnet test --no-build --configuration Release
- name: 📦 Pack
run: dotnet pack --configuration Release --no-build
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: 🔼 Upload packages as artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
name: nuget
path: artifacts/nuget/
- name: 🔼 Upload global.json as artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
name: global-json
path: global.json