forked from RPTools/rplib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (55 loc) · 2.2 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# The .travis/builder.sh script now takes into account whether this is a
# tagged commit and whether it's part of the RPTools repository. If the
# answer is yes to both, then "./gradlew bintrayUpload" is executed.
# Otherwise, it's just a regular "./gradlew build".
#
# Eventually, we'll have Travis do this as a deploy target:
# https://docs.travis-ci.com/user/deployment/bintray/
language: java
script: ./gradlew build
jdk: oraclejdk8
# Shamelessly copied from Jamz's TokenTool configuration file. :)
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
# This will cause a deploy back to GitHub for any tagged commit. Note
# that tagging from the command line seems to require the "-a" option
# when tagging in order to trigger Travis to deploy. Use the Travis
# "Settings" for your repo to add the DEPLOYMENT_KEY variable; the value
# should be GitHub's _personal OAuth token_.
deploy:
- provider: releases
api_key: $DEPLOYMENT_KEY
# Must prevent 'git stash --all' that Travis does -- we want the JARs
# to still be in place!
skip_cleanup: true
file_glob: true
file: build/libs/*.jar
# The 'draft' tag prevents the release from being public unless/until
# the release is edited at github.com and the state changed.
draft: true
on:
tags: true
# And this will deploy to bintray. This is only for libraries, of course.
# The deployment descriptor, bintray.deploy.json, is created by Gradle
# when it builds the JAR. Create Travis variables via the "Settings"
# for the repo. The bintray key can be found by logging into bintray,
# editing your profile, clicking "API KEY" in the bottom left, then
# copy/pasting the key.
- provider: bintray
skip_cleanup: true
file: package/bintray.deploy.json
user: $BINTRAY_USER
key: $BINTRAY_KEY
# Add 'passphrase: ...' if a GPG-signed key is used (primarily
# for when bintray artifacts are published to JCenter or Maven).
on:
repo: RPTools/rplib
tags: true
# (When dpl is fixed, the 'edge' key can be removed. See travis-ci#9314)
edge:
branch: v1.8.47