-
Notifications
You must be signed in to change notification settings - Fork 18
/
.travis.yml
74 lines (63 loc) · 2.23 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Main language/toolchain
language: csharp
# Mono is not required for this project
mono: none
# Install .NET Core 2.1
dotnet: 2.1
# Run Ubuntu Trusty
dist: trusty
# Disable sudo to enable running inside a container
sudo: false
# Skip the installation step
install: true
## NOTE: Conditionals are broken with tagged releases:
## https://github.com/Didstopia/PDFSharp/issues/34
# Additional jobs that run after tests
jobs:
fast_finish: true
include:
- stage: Build and Test
script:
- dotnet restore
- dotnet build -c ${BUILD_CONFIG}
- dotnet test -c ${BUILD_CONFIG} --no-build Didstopia.PDFSharp.Tests
- dotnet pack -c ${BUILD_CONFIG} --no-build
- stage: Deploy to MyGet
#if: (branch = development) AND (type != pull_request)
script: skip
deploy:
provider: script
script: .scripts/deploy.sh $BUILD_CONFIG $MYGET_API_KEY $MYGET_FEED
skip_cleanup: true
on:
repo: Didstopia/PDFSharp
branch: development
tags: false
- stage: Deploy to NuGet
#if: branch = master
script: skip
deploy:
provider: script
script:
- if [ ! -z "$TRAVIS_TAG" ]; then .scripts/deploy.sh $BUILD_CONFIG $NUGET_API_KEY "" $TRAVIS_TAG; else echo "Missing tag, skipping NuGet deployment.."; fi
skip_cleanup: true
on:
repo: Didstopia/PDFSharp
branch: master
tags: false
- stage: Deploy to GitHub
#if: branch = master
script:
- if [ ! -z "$TRAVIS_TAG" ]; then dotnet restore /p:PackageVersion=${TRAVIS_TAG#v}; else echo "Missing tag, skipping restore.."; fi
- if [ ! -z "$TRAVIS_TAG" ]; then dotnet build -c $BUILD_CONFIG /p:PackageVersion=${TRAVIS_TAG#v}; else echo "Missing tag, skipping build.."; fi
- if [ ! -z "$TRAVIS_TAG" ]; then dotnet pack -c $BUILD_CONFIG --no-build /p:PackageVersion=${TRAVIS_TAG#v}; else echo "Missing tag, skipping pack.."; fi
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file_glob: true
file: "Didstopia.PDFSharp/bin/${BUILD_CONFIG}/*.nupkg"
skip_cleanup: true
on:
repo: Didstopia/PDFSharp
branch: master
tags: true