-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (43 loc) · 1.68 KB
/
CI.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
name: Java CI with Gradle
on:
push:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
strategy:
matrix:
java-version: [ '17', '18', '19', '20', '21' ]
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
# Gradle java toolchain cannot find early release images, need to preload until GA is available
- name: Preload JDK 21
if: ${{ matrix.java-version == '21' }}
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
with:
java-version: '21-ea'
distribution: 'temurin'
- name: Set up JDK 11
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Build application
run: |
./gradlew io.openliberty.java.internal_fat_${{ matrix.java-version }}:build
- name: Verify application
run: |
./.github/workflows/scripts/verifyArtifact.sh ${{ matrix.java-version }}
- name: Repackage application
run: |
./.github/workflows/scripts/repackageApplication.sh io.openliberty.java.internal_fat_${{ matrix.java-version }}/build/libs/io.openliberty.java.internal_fat_${{ matrix.java-version }}.war .jar
- name: Upload application
uses: actions/upload-artifact@013d2b89baa2f354c5ffec54c68bec4ab39a2534 #v3.1.2
with:
name: Applications
path: io.openliberty.java.internal_fat_${{ matrix.java-version }}/build/libs/io.openliberty.java.internal_fat_${{ matrix.java-version }}.jar
if-no-files-found: error