-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (54 loc) · 1.54 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
59
60
61
62
63
64
65
66
67
68
name: Build
on:
pull_request:
push:
branches:
- master
- devel
jobs:
validation:
name: "Gradle Wrapper Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
build:
needs: validation
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ 17, 18, 21 ]
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: ${{ matrix.java-version }}
- name: Print Java Version
run: java --version
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
cache-read-only: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/devel' }}
- name: Lint Gradle File
run: ./gradlew autoLintGradle
- name: Build project
run: ./gradlew build spotbugsMain -x test
- name: Unit Test
run: ./gradlew test
- name: Integration Test
run: ./gradlew integrationTest
- name: Publish Candidate
if: |
startsWith(github.ref, 'refs/tags/v') &&
contains(github.ref, '-rc.')
run: ./gradlew --info --stacktrace -Prelease.useLastTag=true candidate
- name: Upload Artifacts
uses: actions/upload-artifact@v3
if: |
startsWith(github.ref, 'refs/tags/v')
with:
name: Package
path: ./**/build/libs/*.jar