Skip to content

Commit

Permalink
Fix the deploy condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Alexandre committed Jan 24, 2019
1 parent f4398a8 commit 14918c7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ script:

after_script:
- bash <(curl -s https://codecov.io/bash)

before_deploy:
- echo "TRAVIS_TAG=$TRAVIS_TAG"
- VERSION=`echo $TRAVIS_TAG | grep -oP '(?<=v).*'`
- echo $VERSION
- dotnet pack -c Release /p:Version=$VERSION
deploy:
skip_cleanup: true
on:
condition: "$TRAVIS_TAG =~ ^v\\d\\.\\d\\.\\d.*$"
tags: true
condition: "$TRAVIS_TAG =~ ^v[0-999].[0-999].[0-999].*$"
provider: script
script: |
export Version=`echo $TRAVIS_TAG | grep -oP '(?<=v).*'`
dotnet pack -c Release /p:Version=$Version
dotnet nuget push **/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY
script: dotnet nuget push **/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY

0 comments on commit 14918c7

Please sign in to comment.