Skip to content

Update workflow to fix it failing #73

Update workflow to fix it failing

Update workflow to fix it failing #73

Workflow file for this run

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/