-
-
Notifications
You must be signed in to change notification settings - Fork 89
55 lines (47 loc) · 1.58 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
name: Java CI
on:
pull_request:
push:
branches:
- master
schedule:
- cron: '0 0 * * 0' # weekly
jobs:
build:
runs-on: ubuntu-latest
name: Java ${{ matrix.java }} - ${{ matrix.storageType }}
strategy:
matrix:
include:
- storageType: mariadb
java: 8
- storageType: h2
java: 8
- storageType: mariadb
java: 11
- storageType: h2
java: 11
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Execute Gradle build
env:
STORAGE_TYPE: ${{ matrix.storageType }}
run: ./gradlew build --info
- name: Publish to Maven Central
# only publish once
if: github.ref == 'refs/heads/master' && matrix.java == '8' && matrix.storageType == 'h2'
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }}
ORG_GRADLE_PROJECT_signingKey : ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }}
ORG_GRADLE_PROJECT_signingPassword : ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}
run: |
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository