2026-03-21 00:29:52 +00:00
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
paths:
|
2026-03-26 00:48:34 +00:00
|
|
|
- 'overrides/**/*'
|
2026-03-21 00:29:52 +00:00
|
|
|
- 'modrinth.index.json'
|
2026-03-26 00:48:34 +00:00
|
|
|
- '.forgejo/workflows/build-1.20.yaml'
|
2026-03-21 00:29:52 +00:00
|
|
|
jobs:
|
2026-03-26 00:48:34 +00:00
|
|
|
build-1.20:
|
2026-03-21 00:29:52 +00:00
|
|
|
runs-on: docker
|
|
|
|
|
container:
|
2026-03-26 00:48:34 +00:00
|
|
|
image: debian:trixie-20260316-slim
|
2026-03-21 00:29:52 +00:00
|
|
|
steps:
|
|
|
|
|
- name: Install dependencies
|
2026-03-26 00:48:34 +00:00
|
|
|
run: |
|
2026-03-26 01:13:19 +00:00
|
|
|
apt update && apt install -y git nodejs openjdk-21-jre-headless wget zstd
|
2026-03-21 00:29:52 +00:00
|
|
|
|
|
|
|
|
- name: Checkout code
|
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
2026-03-26 00:48:34 +00:00
|
|
|
- name: Download mod
|
2026-03-21 00:29:52 +00:00
|
|
|
run: |
|
2026-03-26 00:48:34 +00:00
|
|
|
wget --directory-prefix deps https://patience.nearmisses.xyz/patience/mc_rebalance/archive/main.tar.gz
|
|
|
|
|
tar xf deps/main.tar.gz --directory deps/
|
2026-03-21 00:29:52 +00:00
|
|
|
|
|
|
|
|
- name: Restore cached files
|
|
|
|
|
id: cache-files-restore
|
|
|
|
|
uses: actions/cache/restore@v5
|
|
|
|
|
with:
|
|
|
|
|
path: |
|
|
|
|
|
~/.gradle/caches
|
|
|
|
|
~/.gradle/wrapper
|
|
|
|
|
deps/mc_rebalance/.gradle
|
|
|
|
|
deps/mc_rebalance/build
|
|
|
|
|
key: Main-Gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
|
|
|
restore-keys: |
|
|
|
|
|
Main-Gradle-
|
|
|
|
|
|
|
|
|
|
- name: Execute Gradle build
|
|
|
|
|
run: |
|
|
|
|
|
cd "deps/mc_rebalance/"
|
|
|
|
|
./gradlew build
|
|
|
|
|
|
|
|
|
|
- name: Save cached files
|
|
|
|
|
if: always() && steps.cache-files-restore.outputs.cache-hit != 'true'
|
|
|
|
|
uses: actions/cache/save@v5
|
|
|
|
|
with:
|
|
|
|
|
path: |
|
|
|
|
|
~/.gradle/caches
|
|
|
|
|
~/.gradle/wrapper
|
|
|
|
|
deps/mc_rebalance/.gradle
|
|
|
|
|
deps/mc_rebalance/build
|
|
|
|
|
key: ${{ steps.cache-files-restore.outputs.cache-primary-key }}
|
|
|
|
|
|
|
|
|
|
- name: Save mod to pack
|
|
|
|
|
run: |
|
2026-03-26 00:48:34 +00:00
|
|
|
mkdir -p overrides/mods
|
2026-03-21 00:29:52 +00:00
|
|
|
cp "deps/mc_rebalance/build/libs/mc_rebalance-"[0-9].[0-9].[0-9]".jar" "overrides/mods"
|
|
|
|
|
|
|
|
|
|
(cd "overrides/global_packs/required_data/mc_rebalance_datapack/assets/minecraft/lang/" && ./gen-langs.sh)
|
|
|
|
|
|
|
|
|
|
- name: Upload release
|
|
|
|
|
uses: https://data.forgejo.org/forgejo/upload-artifact@v4
|
|
|
|
|
with:
|
2026-03-26 00:48:34 +00:00
|
|
|
name: MC_Rebalance.mrpack
|
2026-03-21 00:29:52 +00:00
|
|
|
path: |
|
|
|
|
|
overrides
|
|
|
|
|
modrinth.index.json
|
|
|
|
|
!**/*.sh
|