-
Notifications
You must be signed in to change notification settings - Fork 141
/
.travis.yml
69 lines (64 loc) · 1.69 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
62
63
64
65
66
67
68
69
_deploy: &_deploy
name: "${PROJECT_VERSION}"
provider: releases
api_key: "$GITHUB_OAUTH_TOKEN"
skip_cleanup: true
overwrite: true
file_glob: true
file: build/*-dist.zip
on: &_deploy_on
jdk: oraclejdk9
language: java
os: linux
group: edge
arch: arm64-graviton2
dist: xenial
virt: lxd
install: true
script: true
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
- rm -f $HOME/.gradle/caches/*/fileHashes/fileHashes.bin
- rm -f $HOME/.gradle/caches/*/fileHashes/fileHashes.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
jobs:
include:
- script: ./gradlew check --stacktrace
jdk: oraclejdk9
- script: ./gradlew check --stacktrace
jdk: oraclejdk17
- stage: GitHub Release
jdk: oraclejdk9
script:
- ./gradlew release
- export PROJECT_VERSION=$(./gradlew -q printVersion)
deploy:
- <<: *_deploy
prerelease: true
draft: true
name: "Test release ${PROJECT_VERSION}"
on:
<<: *_deploy_on
branch: release-test
- <<: *_deploy
prerelease: true
name: "Preview release ${PROJECT_VERSION}"
on:
<<: *_deploy_on
all_branches: true
condition: $TRAVIS_TAG =~ /^preview[-/].*$/
- <<: *_deploy
prerelease: true
on:
<<: *_deploy_on
branch: master
condition: $PROJECT_VERSION =~ ^.*SNAPSHOT$
- <<: *_deploy
on:
<<: *_deploy_on
branch: master
condition: ! $PROJECT_VERSION =~ ^.*SNAPSHOT$