-
Notifications
You must be signed in to change notification settings - Fork 6
/
.drone.yml
55 lines (47 loc) · 1018 Bytes
/
.drone.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
kind: pipeline
name: default
platform:
os: linux
arch: amd64
steps:
- name: build
image: mcr.microsoft.com/dotnet/core/sdk:3.1
volumes:
- name: nuget
path: /root/.nuget/packages/
commands:
- git submodule update --init
- dotnet restore
- dotnet build -c Release --no-restore
- name: test
image: mcr.microsoft.com/dotnet/core/sdk:3.1
volumes:
- name: nuget
path: /root/.nuget/packages/
commands:
- dotnet test -c Release --no-build --no-restore
- name: publish
image: mcr.microsoft.com/dotnet/core/sdk:3.1
environment:
NUGET_APIKEY:
from_secret: NUGET_APIKEY
volumes:
- name: nuget
path: /root/.nuget/packages/
commands:
- cd UriTemplates
- dotnet pack -c Release --no-build --no-restore
- dotnet nuget push bin/Release/**.nupkg --source "https://nuget.org" --api-key $NUGET_APIKEY --skip-duplicate
when:
branch:
- master
event:
- push
volumes:
- name: nuget
temp: {}
trigger:
event:
- pull_request
- push
- tag