forked from ADAPT/ADMPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
28 lines (26 loc) · 1.1 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
language: csharp
dotnet: 2.1.4
env:
- FrameworkPathOverride=/usr/lib/mono/4.5/
jobs:
include:
- stage: test
mono: none
script:
- dotnet test ./PluginTest/PluginTest.csproj -c Release
- dotnet test ./AcceptanceTest/AcceptanceTest.csproj -c Release
- stage: deploy
if: tag =~ ^v\d+\.\d+\.\d+
mono: 5.8.0
script:
- VERSION=$(echo $TRAVIS_TAG | grep -i -P -o '(?<=^v)\d+\.\d+\.\d+(?:.+)?$'); VERSION_NUMBER=$(echo $VERSION | grep -i -P -o '^\d+\.\d+\.\d+')
- dotnet build ./ADMPlugin.sln -c Release /p:Version=$VERSION /p:FileVersion=$VERSION_NUMBER.$TRAVIS_BUILD_NUMBER
- mkdir -p ./dist; nuget pack ./AgGatewayADMPlugin.nuspec -outputdirectory ./dist -version $VERSION
- if [ -n "${NUGET_API_KEY}" ]; then dotnet nuget push ./dist/AgGatewayADMPlugin.${VERSION}.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json; fi
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file: "./dist/AgGatewayADMPlugin.${VERSION}.nupkg"
skip_cleanup: true
on:
tags: true