travis: use stages and added snapshot upload

This commit is contained in:
Karl Tauber
2020-02-05 15:29:00 +01:00
parent 84d05603ef
commit a000c8fd99

View File

@@ -19,11 +19,25 @@ before_install:
- ./gradlew --version - ./gradlew --version
- java -version - java -version
deploy: stages:
provider: script - name: build
script: ./gradlew bintrayUpload - name: snapshot
skip_cleanup: true # to upload artifacts created during the build if: branch = master AND type IN (push) AND tag IS blank
on: - name: release
branch: master if: branch = master AND type IN (push) AND tag IS present
jdk: openjdk11
tags: true jobs:
include:
# run gradle build
- stage: build
script: ./gradlew build
# publish snapshot to oss.jfrog.org
- stage: snapshot
jdk: openjdk11
script: ./gradlew artifactoryPublish
# release a new stable version to bintray
- stage: release
jdk: openjdk11
script: ./gradlew bintrayUpload -Drelease=true