Skip to content

build(workflows): run with java 21 #45

build(workflows): run with java 21

build(workflows): run with java 21 #45

Workflow file for this run

name: Build
on:
pull_request:
push:
branches:
- master
- devel
tags:
- v*
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 -x test
- name: Unit Test
run: ./gradlew test
- name: Integration Test
run: ./gradlew integrationTest
- name: Build tag
if: |
startsWith(github.ref, 'refs/tags/v')
run: ./gradlew --info --stacktrace -Prelease.useLastTag=true bootJar
- name: Upload Artifacts
uses: actions/upload-artifact@v3
if: |
startsWith(github.ref, 'refs/tags/')
with:
path: ./**/ngtor-app/build/libs/*-boot.jar
if-no-files-found: error