update GitHub workflow java version #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Setup JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Apply Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: $${{ runner.os }}-gradle | |
- name: Build with Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
arguments: build | |
- name: GitHub Action Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.build.outputs.artifact_name }} | |
path: ${{ steps.build.outputs.artifact_path }} |