-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 932 Bytes
/
dotnet-core.yml
File metadata and controls
41 lines (39 loc) · 932 Bytes
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
name: .NET Core
on:
push:
branches:
- master
jobs:
build:
runs-on: 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: |
cd src/
dotnet restore
- name: Test
run: |
cd src/
dotnet test
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
- name: Build package for Release
run: |
cd src/
echo $GITHUB_RUN_NUMBER
dotnet pack -c Release
- name: Push package to nuget
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
run: dotnet nuget push **/SmartHead.*.nupkg -k $NUGET_KEY -s https://www.nuget.org/api/v2/package --skip-duplicate