-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.drone.yml
45 lines (42 loc) · 1.59 KB
/
.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
kind: pipeline
name: default
steps:
- name: build
image: mcr.microsoft.com/dotnet/core/sdk:3.1
commands:
- dotnet restore
- dotnet build -c Debug
when:
event:
- push
- name: test
image: mcr.microsoft.com/dotnet/core/sdk:3.1
environment:
CODECOV_TOKEN:
from_secret: CODECOV_TOKEN
commands:
- dotnet restore
- dotnet tool install -g dotnet-reportgenerator-globaltool
- dotnet test -c Debug --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include=[CsProjEditor.*]*
- curl -s https://codecov.io/bash > codecov
- chmod +x codecov
- ./codecov -f ./tests/CsProjEditor.Tests/coverage.opencover.xml -t $CODECOV_TOKEN
when:
event:
- push
- name: deploy
image: mcr.microsoft.com/dotnet/core/sdk:3.1
environment:
NUGET_KEY:
from_secret: NUGET_KEY
commands:
- dotnet restore
- dotnet build -c Release
- dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include=[CsProjEditor.*]*
- dotnet pack ./src/csprojcli/csprojcli.csproj -c Release --no-build -p:Version=${DRONE_TAG}
- dotnet nuget push ./src/csprojcli/bin/Release/csprojcli.${DRONE_TAG}.nupkg -s https://www.nuget.org/api/v2/package -k $NUGET_KEY
- dotnet pack ./src/CsProjEditor/CsProjEditor.csproj -c Release --no-build -p:Version=${DRONE_TAG}
- dotnet nuget push ./src/CsProjEditor/bin/Release/CsProjEditor.${DRONE_TAG}.nupkg -s https://www.nuget.org/api/v2/package -k $NUGET_KEY
when:
event:
- tag