-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (62 loc) · 1.91 KB
/
master-branch-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
59
60
61
62
63
64
name: Master Branch Build
on:
push:
branches:
- master
jobs:
master-build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '1.8', '11', '13' ]
name: Build Master Branch Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v1
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Build with Gradle
env:
GRADLE_SCAN_PUBLISH: ${{ matrix.java == '1.8' }}
JOOQ_CONTAINER_TESTS: true
JOOQ_PRO_TESTS: true
JOOQ_REPO_URL: ${{ secrets.JOOQ_REPO_URL }}
JOOQ_REPO_USERNAME: ${{ secrets.JOOQ_REPO_USERNAME }}
JOOQ_REPO_PASSWORD: ${{ secrets.JOOQ_REPO_PASSWORD }}
run: sh ./gradlew build
- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
name: libs-java-${{ matrix.java }}
path: build/libs
- name: Upload Test Results
uses: actions/upload-artifact@v1
with:
name: tests-java-${{ matrix.java }}
path: build/reports/tests/test
- name: Upload Static Analysis
uses: actions/upload-artifact@v1
with:
name: analysis-java-${{ matrix.java }}
path: build/reports/detekt
artifactory-publish:
needs: master-build
runs-on: ubuntu-latest
name: Publish Master Branch Java ${{ matrix.java }} to Artifactory
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Download Java 8 libs
uses: actions/download-artifact@v1
with:
name: libs-java-1.8
path: build/libs
- name: Publish to Artifactory
env:
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
run: sh ./gradlew artifactoryPublish -PbintrayUser=$BINTRAY_USER -PbintrayKey=$BINTRAY_KEY