-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (46 loc) · 1.38 KB
/
gradle.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
name: Gradle Build
on:
workflow_dispatch:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
java-version: [ 21 ]
distribution: [ adopt ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: ${{ matrix.distribution }}
- name: Build with Gradle
uses: gradle/gradle-build-action@v3
with:
arguments: build
- name: Save Test Reports
uses: actions/upload-artifact@v4
if: always()
with:
name: test-reports-${{ matrix.os }}-${{ matrix.java }}
path: '*/build/reports'
- name: Build jlink Image with Gradle
uses: gradle/gradle-build-action@v3
with:
arguments: jlinkZip
- name: Save Image
uses: actions/upload-artifact@v4
with:
name: image-${{ matrix.os }}-${{ matrix.java-version }}-${{ matrix.distribution }}
path: '*/build/image.zip'