-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (49 loc) · 1.27 KB
/
.travis.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
56
# Travis CI build pipeline
# --------------------------------------------
os: linux
dist: xenial
language: csharp
solution: ModelLib.sln
mono: none
dotnet: 6.0.302
addons:
apt:
packages:
- zip
- tar
- gzip
before_script:
- set -e
- dotnet restore
script:
- |
if [[ -z "$TRAVIS_TAG" ]]; then
set -e
dotnet build -c Release
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[xunit*]*" /p:excludebyfile="**/*.Designer.cs"
bash <(curl -s https://codecov.io/bash) -Z
fi
before_deploy:
- set -e
- dotnet build ModelLib.sln -c Release
- dotnet pack ModelLib.sln -c Release -o nuget
- |
mkdir output
mv ./PersonLib/bin/Release ./output/PersonLib
mv ./AddressLib/bin/Release ./output/AddressLib
- |
zip -r ./Model.zip ./output/*
tar cfvz ./Model.tar.gz ./output
deploy:
provider: releases
overwrite: true
api_key: $GITHUB_TOKEN
file:
- "./Model.zip"
- "./Model.tar.gz"
skip_cleanup: true
on:
tags: true
after_deploy:
- dotnet nuget push --skip-duplicate ./nuget/'*.nupkg' -k $NUGET_TOKEN -s https://api.nuget.org/v3/index.json
- dotnet nuget push --skip-duplicate ./nuget/'*.nupkg' -k $PACKAGE_TOKEN -s https://nuget.pkg.github.com/sunriax/index.json