Merge branch 'master' into Quagington/master #5
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 Gradle | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
# https://github.com/actions/checkout | |
- name: Check out Git repository | |
uses: actions/[email protected] | |
# https://github.com/gradle/gradle-build-action | |
- name: Setup Gradle | |
uses: gradle/actions/[email protected] | |
# https://github.com/gradle/wrapper-validation-action | |
- name: Wrapper validation | |
uses: gradle/actions/[email protected] | |
# https://github.com/actions/setup-java | |
- name: Set up JDK 17 | |
uses: actions/[email protected] | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
java-package: jdk | |
architecture: x64 | |
cache: gradle | |
# https://github.com/actions/setup-java | |
- name: Set up JDK 21 | |
uses: actions/[email protected] | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
java-package: jdk | |
architecture: x64 | |
cache: gradle | |
# https://hub.spigotmc.org/jenkins/job/BuildTools | |
- name: Download BuildTools | |
run: wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar | |
- name: Build MC 1.20.6 | |
run: java -jar BuildTools.jar --rev 1.20.6 --remapped | |
- name: Build MC 1.21.3 | |
run: java -jar BuildTools.jar --rev 1.21.3 --remapped | |
- name: Configure Git | |
run: git config --global user.name "Github Actions" && git config --global user.email "[email protected]" | |
- name: Make Gradlew executable | |
run: chmod +x ./gradlew | |
- name: Build project | |
run: ./gradlew obfuscate --no-daemon | |
# https://github.com/actions/upload-artifact | |
- name: Upload build artifact | |
uses: actions/[email protected] | |
with: | |
name: UltraCosmetics-dev | |
path: build/libs/UltraCosmetics-*.jar |