-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (42 loc) · 1.11 KB
/
dotnet-core.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
name: .NET Core
on:
push:
branches: [ main ]
paths-ignore:
- 'README.md'
- '**.jpg'
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Pack
if: matrix.os == 'ubuntu-latest'
run: |
arrTag=(${GITHUB_REF//\// })
VERSION="${arrTag[2]}"
VERSION="${VERSION//v}"
echo "OurVersion=${VERSION//v}" >> $GITHUB_ENV
dotnet pack --configuration Release
- name: Upload Artifact
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v2
with:
env: OurVersion
name: nupkg-${OurVersion}
path: /home/runner/work/Diverse/Diverse/Diverse/bin/Release/*.nupkg