Refactor github release config in .travis.yml

pull/157/head
johnniang 2019-05-10 21:19:13 +08:00 committed by John Niang
parent 6de9491d08
commit be568757be
1 changed files with 14 additions and 12 deletions

View File

@ -16,30 +16,32 @@ jobs:
script: ./gradlew check script: ./gradlew check
- stage: build - stage: build
script: ./gradlew build -x test script: ./gradlew build -x test
- stage: build-docker-image-for-release - stage: Build Docker Image for Release
script: ./scripts/docker-build-release.sh script: ./scripts/docker-build-release.sh
- stage: build-docker-image-for-dev - stage: Build Docker Image for Dev
script: ./scripts/docker-build-dev.sh script: ./scripts/docker-build-dev.sh
- stage: GitHub Release
script: echo "Deploying to GitHub releases ..."
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file: build/libs/*
skip_cleanup: true
on:
tags: true
stages: stages:
- test - test
- build - build
- name: build-docker-image-for-release - GitHub Release
- name: Build Docker Image for Release
if: tag =~ /^v\d+\.\d+(\.\d+)?(-release)?$/ if: tag =~ /^v\d+\.\d+(\.\d+)?(-release)?$/
- name: build-docker-image-for-dev - name: Build Docker Image for Dev
if: tag =~ /^v\d+\.\d+(\.\d+)?-(beta|alpha)+(\.\d+)?$/ if: tag =~ /^v\d+\.\d+(\.\d+)?-(beta|alpha)+(\.\d+)?$/
branches: branches:
only: only:
- master - master
- dev - dev
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/ - /^v\d+\.\d+(\.\d+)?(-\S*)?$/
deploy:
provider: releases
api_key:
secure: $GITHUB_OAUTH_TOKEN
file: build/libs/*
skip_cleanup: true
on:
tags: true
notifications: notifications:
webhooks: webhooks:
- https://fathomless-fjord-24024.herokuapp.com/notify - https://fathomless-fjord-24024.herokuapp.com/notify