-
Notifications
You must be signed in to change notification settings - Fork 108
77 lines (73 loc) · 2.16 KB
/
main.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
70
71
72
73
74
75
76
77
name: CI
on:
push:
branches:
- develop
- rel/v*
pull_request:
branches: [ develop ]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11
- name: Run Checks
uses: burrunan/gradle-cache-action@v1
with:
job-id: jdk11-build-test
arguments: checkstyleMain checkstyleTest
build:
runs-on: ubuntu-latest
needs: [check]
strategy:
matrix:
pg: [10, 11, 12, 13, 14, 15, 16]
jdk: [8, 11]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.jdk }}
- name: Setup PostgreSQL SSL Permissions
run: |
chmod 0400 ./driver/src/test/resources/certdir/server/server.key
sudo chown 70:70 ./driver/src/test/resources/certdir/server/server.key
- name: Build & Test
uses: burrunan/gradle-cache-action@v1
with:
job-id: jdk${{ matrix.jdk }}-build-test
properties: |
postgresVersions=${{ matrix.pg }}
arguments: test -x checkstyleMain -x checkstyleTest
deploy:
needs: [check, build]
if: github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/rel/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- name: Publish Maven Artifacts
uses: burrunan/gradle-cache-action@v1
with:
job-id: jdk8-build-test
properties: |
postgresVersions=12
ossrhUsername=${{ secrets.OSSRH_USERNAME }}
ossrhPassword=${{ secrets.OSSRH_PASSWORD }}
arguments: publish
- name: Publish Documentation
uses: burrunan/gradle-cache-action@v1
env:
GRGIT_USER: kdubb
GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }}
with:
job-id: jdk11-build-test
properties: |
postgresVersions=12
docsRepoUri=https://github.com/impossibl/pgjdbc-ng.git
arguments: documentation:gitPublishPush