tweaks724/.forgejo/workflows/build.yml
Minecon724 2320140073
All checks were successful
/ build (push) Successful in 51s
Build for other versions
Now supports all 1.21s
2024-12-28 18:49:58 +01:00

32 lines
No EOL
1.2 KiB
YAML

on: [push]
jobs:
build:
runs-on: docker
container: debian:sid
steps:
- name: Install JDK and other deps
run: apt update && apt install --no-install-recommends -y openjdk-21-jdk-headless maven git nodejs curl zstd
- name: Clone repository
run: git clone -b ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} https://git.m724.eu/Minecon724/tweaks724.git .
- name: Download NMS
run: ./tools/download_nms.sh ~
- name: Build for 1.21.1
run: mkdir artifact && mvn clean package && mv target/tweaks-*+1.21.1.jar artifact/
- name: Build for 1.21.3
run: find src \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s/v1_21_R1/v1_21_R2/g" && mvn clean package -Dproject.minecraft.version=1.21.3 && mv target/tweaks-*+1.21.3.jar artifact/
- name: Build for 1.21.4
run: find src \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s/v1_21_R2/v1_21_R3/g" && mvn clean package -Dproject.minecraft.version=1.21.4 && mv target/tweaks-*+1.21.4.jar artifact/
- name: Upload artifacts
uses: https://github.com/actions/upload-artifact@v3
with:
path: artifact