Skip to content

feat: update for 1.21.1 #24

feat: update for 1.21.1

feat: update for 1.21.1 #24

Workflow file for this run

# Automatically build the project and run any configured tests for every push
# and submitted pull request. This can help catch issues that only occur on
# certain platforms or Java versions, and provides a first line of defence
# against bad commits.
name: CI
on:
push:
branches: [main]
paths:
- "src/**"
- "gradle/**"
- "**.gradle"
- "gradlew*"
- "gradle.properties"
tags-ignore:
- "**"
pull_request:
paths:
- "src/**"
- "gradle/**"
- "**.gradle"
- "gradlew*"
- "gradle.properties"
workflow_dispatch:
workflow_call:
jobs:
build:
name: Build
strategy:
matrix:
java:
- 21 # Current Java LTS & minimum supported by Minecraft
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- 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
run: ./gradlew build
- name: Capture 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: jars
path: build/libs/
if-no-files-found: error