fix: bump Fabric Loader constraint to avoid crashes due to dependenci… #163
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 FlightAssistant | |
on: [ pull_request, push ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
# Use these Java versions | |
java: [ | |
17, # Current Java LTS & minimum supported by Minecraft | |
21, # Current Java LTS | |
] | |
# and run on both Linux and Windows | |
os: [ ubuntu-22.04, windows-2022 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Restore Gradle caches | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/loom-cache | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@v2 | |
- name: Setup JDK ${{ matrix.java }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'microsoft' | |
- name: Make Gradle wrapper executable | |
if: ${{ runner.os != 'Windows' }} | |
run: chmod +x ./gradlew | |
- name: Build with Gradle | |
run: ./gradlew build --stacktrace | |
- name: Extract current branch name | |
shell: bash | |
# bash pattern expansion to grab branch name without slashes | |
run: ref="${GITHUB_REF#refs/heads/}" && echo "branch=${ref////-}" >> $GITHUB_OUTPUT | |
id: ref | |
- name: Publish build artifacts | |
if: ${{ runner.os == 'Linux' && matrix.java == '21' }} # Only upload artifacts built from latest Java on one OS | |
uses: actions/upload-artifact@v4 | |
with: | |
name: flightassistant-${{ steps.ref.outputs.branch }} | |
path: build/libs/ |