Skip to content

Commit

Permalink
Pack and tag on merged PR
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-BenZarrouk-MB committed Aug 23, 2019
1 parent 09df232 commit 9d6ce63
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,19 @@ sudo: required
dist: xenial
dotnet: 2.2
env:
- VERSION=1.6.2
- VERSION=1.6.1
- LIVE_KEY=
stages:
- test
- name: test
- name: deploy
if: (branch = master) AND (NOT (type IN (push, pull_request)))
jobs:
include:
- stage: test
script:
- echo $VERSION
- echo "$TRAVIS_BRANCH"
- git config --list
- git tag test-tag
- cd Tests/UnitTests/MessageBirdUnitTests
- dotnet restore
- dotnet test
- test "$(curl -I https://globalcdn.nuget.org/packages/messagebird.$VERSION.nupkg | head -n1 | awk '{print $2}')" -eq 200 && echo "package with version $VERSION already exists" && exit 0 || echo "Packing and uploading ..."
- echo "CONTINUING"
- cd ../../../MessageBird
- dotnet restore
- dotnet build
- dotnet pack -p:PackageID=MessageBird -c Release -p:PackageVersion=$VERSION
- stage: deploy
script:
- test "$(curl -I https://globalcdn.nuget.org/packages/messagebird.$VERSION.nupkg | head -n1 | awk '{print $2}')" -eq 200 && echo "package with version $VERSION already exists" && exit 0 || echo "Packing and uploading ..."
Expand All @@ -35,4 +26,5 @@ jobs:
- dotnet build
- dotnet pack -p:PackageID=MessageBird -c Release -p:PackageVersion=$VERSION
- dotnet nuget push bin/Release/MessageBird.$VERSION.nupkg -k $LIVE_KEY -s https://api.nuget.org/v3/index.json
- git tag $VERSION

0 comments on commit 9d6ce63

Please sign in to comment.