forked from fluentmigrator/fluentmigrator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
35 lines (35 loc) · 1.87 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
language: csharp
dist: xenial
sudo: false
mono: latest
dotnet: 2.1
git:
depth: false
before_script:
- nuget install GitVersion.CommandLine -Version 4.0.0-beta0012 -Prerelease -ExcludeVersion
- export GITVERSION_TOOL="mono GitVersion.CommandLine/tools/GitVersion.exe"
- export VERSION=$($GITVERSION_TOOL /showvariable SemVer)
- echo Using Version=$VERSION
- chmod a+x ./*.sh
script:
- dotnet pack ./FluentMigrator.sln -c "Release" -o "$TRAVIS_BUILD_DIR/output" -p:SourceLinkCreate=true "-p:Version=$VERSION"
- dotnet test ./test/FluentMigrator.Tests/FluentMigrator.Tests.csproj --filter 'TestCategory!=NotWorkingOnMono&(TestCategory!=Integration|(TestCategory=Integration&(TestCategory=SQLite)))'
- dotnet publish src/FluentMigrator.Console/FluentMigrator.Console.csproj -c Release -r win7-x86 -o "$TRAVIS_BUILD_DIR/publish/tools/net461/x86" -p:Platform=x86 -p:TargetFramework=net461
- dotnet publish src/FluentMigrator.Console/FluentMigrator.Console.csproj -c Release -r win7-x64 -o "$TRAVIS_BUILD_DIR/publish/tools/net461/x64" -p:Platform=x64 -p:TargetFramework=net461
- dotnet publish src/FluentMigrator.Console/FluentMigrator.Console.csproj -c Release -r any -o "$TRAVIS_BUILD_DIR/publish/tools/net461/any" -p:Platform=AnyCPU -p:TargetFramework=net461
- nuget pack publish/FluentMigrator.Console.nuspec -OutputDirectory "$TRAVIS_BUILD_DIR/output" -Version "$VERSION" -Properties Configuration=Release
- nuget pack publish/FluentMigrator.Tools.nuspec -OutputDirectory "$TRAVIS_BUILD_DIR/output" -Version "$VERSION" -Properties Configuration=Release
deploy:
- provider: script
skip_cleanup: true
script: bash ./myget-upload.sh
on:
condition: '"$TRAVIS_BRANCH" == release/* || "$TRAVIS_BRANCH" == develop'
all_branches: true
- provider: script
skip_cleanup: true
script: bash ./nuget-upload.sh
on:
condition: '$TRAVIS_TAG =~ ^v[[:digit:]]+(\.[[:digit:]]+)+$'
tags: true
branch: master