diff --git a/.travis.yml b/.travis.yml index 1a37b41..e7f2415 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ -matrix: - fast_finish: true +jobs: include: - - language: csharp + - stage: Test + language: csharp dist: xenial mono: none dotnet: 2.2 @@ -22,6 +22,28 @@ matrix: script: - npm test + - stage: Deploy + services: + - docker + env: + - RELEASE_NUMBER=1.1.$TRAVIS_BUILD_NUMBER + script: + - docker build --file ./Dockerfile . --tag framebassman/izzy:$RELEASE_NUMBER + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + - docker push framebassman/izzy + before_deploy: + - git config --local user.name $GIT_USERNAME + - git config --local user.email $GIT_EMAIL + - git tag $RELEASE_NUMBER + deploy: + provider: releases + api_key: $GITHUB_OAUTH_TOKEN + skip_cleanup: true + +stages: + - Test + - name: Deploy + if: branch = master AND type != pull_request branches: only: - /.*/ diff --git a/README.md b/README.md index 98fc2c0..4adf334 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ ### CI status -| Branch | Travis-CI | -| ------------- |:----------------------------------------------------------------------------------:| -| master | ![](https://api.travis-ci.com/FrameBassman/izzy.svg?branch=master "master status") | -| dev | ![](https://api.travis-ci.com/FrameBassman/izzy.svg?branch=dev "dev status") | +| Branch | Travis-CI | +| ------------- |:--------------------------------------------------------------------------------------------------------------------------------------:| +| master | [![](https://api.travis-ci.com/FrameBassman/izzy.svg?branch=master "master status")](https://travis-ci.com/FrameBassman/izzy/branches) | +| dev | [![](https://api.travis-ci.com/FrameBassman/izzy.svg?branch=dev "dev status")](https://travis-ci.com/FrameBassman/izzy/branches) | diff --git a/Scripts/deploy.sh b/Scripts/deploy.sh deleted file mode 100644 index b71b2f4..0000000 --- a/Scripts/deploy.sh +++ /dev/null @@ -1,5 +0,0 @@ -if [[ $TRAVIS_BUILD_NUMBER != "" ]]; then - docker build --file ./Dockerfile . --tag framebassman/izzy:1.0.$TRAVIS_BUILD_NUMBER - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker push framebassman/izzy -fi