Update workflow to fix it failing #73
Workflow file for this run
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 Check | |
on: [push, pull_request] | |
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: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
filter: tree:0 | |
- name: validate gradle wrapper | |
uses: gradle/actions/wrapper-validation@v3 | |
- name: setup jdk ${{ matrix.java }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.java }} | |
cache: 'gradle' | |
- name: make gradle wrapper executable | |
if: ${{ runner.os != 'Windows' }} | |
run: chmod +x ./gradlew | |
- name: build | |
# For the reason on `--no-daemon` see https://github.com/actions/cache/issues/454 | |
run: ./gradlew build --no-daemon | |
- name: capture build artifacts | |
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Artifacts | |
path: build/libs/ |