-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
54 lines (47 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
# Travis CI build pipeline
# --------------------------------------------
os: linux
dist: xenialy
language: csharp
solution: UpdateLib.sln
mono: none
dotnet: 3.1.403
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 -c Release -o ./output
- dotnet publish UpdateLib.sln -c Release -o output
- dotnet pack UpdateLib.sln -c Release -o nuget
- zip ./Update.zip ./output/* ./nuget/*
- tar cfvz ./Update.tar.gz ./output ./nuget
deploy:
provider: releases
overwrite: true
api_key: $GITHUB_TOKEN
file:
- "./Update.zip"
- "./Update.tar.gz"
- "./output/RaGae.UpdateLib.UpdateModelLib.dll"
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