-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (53 loc) · 2.19 KB
/
build.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
# Copyright (c) 2018 OpenJAX
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# You should have received a copy of The MIT License (MIT) along with this
# program. If not, see <http://opensource.org/licenses/MIT/>.
name: build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
MAVEN_OPTS: "-Xms64M -Xmx1600M -Dhttp.keepAlive=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=15 -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.rto=15000"
strategy:
matrix:
jdk: ['8', '11']
steps:
- uses: gitboard-io/gitboard-action@main
with:
username: ${{ secrets.SONATYPE_USERNAME }}
key: ${{ secrets.GITBOARD_ID }}
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ matrix.jdk }}
cache: 'maven'
- name: Build
env:
GPG: ${{ secrets.GPG }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: |
if [ "${{ matrix.jdk }}" = "8" ] &&
[ "${{ github.ref }}" = "refs/heads/master" ] &&
[ "${{ github.head_ref }}" = "" ]; then
echo $GPG | base64 -d | gpg --import --no-tty --batch --yes &> /dev/null &&
mvn -e -U -B -s settings.xml -DskipRTests -DcoverallsRepoToken=$COVERALLS_REPO_TOKEN deploy -P javadoc,report,deploy;
else
mvn -e -U -B -s settings.xml -DskipRTests install;
fi