Do not give players a shulker if run context failed to initialize #108
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-and-release | |
on: [ pull_request, push ] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
strategy: | |
matrix: | |
# Use these Java versions | |
java: [ | |
17, # Current Java LTS & minimum supported by Minecraft | |
] | |
# and run on both Linux and Windows | |
os: [ ubuntu-22.04 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
- name: validate gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- 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: download scoreboards.json from brilliance | |
uses: robinraju/[email protected] | |
with: | |
repository: 'trackedout/Brilliance' | |
latest: true | |
fileName: 'scoreboards.json' | |
out-file-path: 'Brilliance' | |
- name: copy scoreboards.json | |
run: cp Brilliance/scoreboards.json src/main/resources/assets/agronet/scoreboards.json | |
- name: build | |
run: ./gradlew build | |
- 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@v3 | |
with: | |
name: Artifacts | |
path: build/libs/ | |
- name: release-tag | |
uses: softprops/action-gh-release@v2 | |
if: ${{ startsWith(github.ref, 'refs/tags/') && runner.os == 'Linux' && matrix.java == '17' }} | |
with: | |
make_latest: true | |
files: | | |
build/libs/agronet-* | |
LICENSE | |
- name: release-latest | |
uses: softprops/action-gh-release@v2 | |
if: github.ref == 'refs/heads/main' | |
with: | |
make_latest: true | |
tag_name: latest | |
files: | | |
build/libs/agronet-* | |
LICENSE |