-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
55 lines (48 loc) · 1.42 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
language: java
cache:
directories:
- $HOME/.m2
dist: xenial
before_install:
- sudo apt-get install pinentry-tty -y gpgv2
jdk:
- openjdk8
stages:
- name: build
if: branch = master
- name: release
if: branch = release
jobs:
include:
- stage: build
script:
- mvn -B verify
- stage: release
script:
- echo "allow-loopback-pinentry" > ~/.gnupg/gpg-agent.conf
- cat ~/.gnupg/gpg-agent.conf
- openssl aes-256-cbc -pass env:OPENSSL_PASSWORD -in mobiliar-private-key.gpg.enc -out mobiliar-private-key.gpg -d -md sha256
- gpg2 --batch --import mobiliar-private-key.gpg
- gpg2 --list-secret-keys --keyid-format LONG
- export GPG_TTY=$(tty)
- export NEW_VERSION=2.1.$TRAVIS_BUILD_NUMBER
#
# maven release build
#
- mvn -B -DnewVersion=$NEW_VERSION versions:set
- mvn -B -P release -s settings-sonatype.xml deploy site
#
# tag release on github
#
- git config --global user.email "$GIT_RELEASE_EMAIL"
- git config --global user.name "$GIT_RELEASE_USERNAME"
- export GIT_TAG=release/$NEW_VERSION
- git tag $GIT_TAG -a -m "tagging release"
- git push -q https://[email protected]/liimaorg/liima-maven-plugin.git --tags
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: ./target/site
on:
branch: release