Skip to content

Commit

Permalink
run gradle with java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
UpcraftLP committed Dec 31, 2024
1 parent 8801138 commit 8c3e36d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
name: build
on: [pull_request, push]

env:
JAVA_VERSION: 21

jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [
17 # Minimum supported by Minecraft
]
# and run on both Linux and Windows
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -24,18 +22,19 @@ jobs:
fetch-depth: 0
- name: validate gradle wrapper
uses: gradle/actions/wrapper-validation@v4
- name: setup jdk ${{ matrix.java }}
- name: setup jdk ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
java-version: ${{ env.JAVA_VERSION }}
distribution: 'temurin'
cache: 'gradle'
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS
if: ${{ runner.os == 'Linux' }} # Only upload artifacts on one OS
uses: actions/upload-artifact@v4
with:
name: Artifacts
Expand Down

0 comments on commit 8c3e36d

Please sign in to comment.