-
Notifications
You must be signed in to change notification settings - Fork 8
39 lines (32 loc) · 962 Bytes
/
deploy.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
name: OakIdeas.GenericRepository - Deploy
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.302
- name: Build
run: dotnet build --configuration Release
working-directory: ./src
- name: Run unit tests
run: dotnet test --configuration Release
working-directory: ./src
- name: Generate nuget package
run: dotnet pack --configuration Release -o nupkg
working-directory: ./src
- name: Publish nuget package
run: |
for pkg in *.nupkg
do
dotnet nuget push $pkg -k $nuget_api_key -s "https://api.nuget.org/v3/index.json" --skip-duplicate
done
env:
nuget_api_key: ${{ secrets.NUGET_API_KEY }}
working-directory: ./src/nupkg