Minecraft 1.6.4 #14
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 | |
on: [pull_request, push] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
java: [ | |
17, | |
21, | |
] | |
os: [ | |
ubuntu-22.04, | |
windows-2022 | |
] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
with: | |
filter: tree:0 # Fetch only historic commits, no blobs or trees | |
fetch-depth: 0 # Pre-release builds include commit count in version number | |
- name: validate gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: setup jdk ${{ matrix.java }} | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: ${{ matrix.java }} | |
- name: make gradle wrapper executable | |
if: ${{ runner.os != 'Windows' }} | |
run: | | |
chmod +x ./gradlew | |
git update-index --assume-unchanged gradlew | |
- name: build | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: build --warning-mode=all | |
cache-read-only: ${{ github.ref != 'refs/heads/stardust' }} | |
- name: capture build artifacts | |
if: ${{ runner.os == 'Linux' && matrix.java == '21' }} # Upload artifacts from one job, ignore the rest | |
uses: actions/upload-artifact@v3 | |
with: | |
name: server-stats-artifacts | |
path: | | |
build/libs | |
!build/libs/*-all.jar | |
if-no-files-found: error |