2026-03-21 00:19:47 +00:00
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
paths:
|
2026-03-21 20:35:12 +00:00
|
|
|
- 'overrides/**/*'
|
2026-03-21 00:19:47 +00:00
|
|
|
- 'modrinth.index.json'
|
|
|
|
|
- '.forgejo/workflows/build.yaml'
|
|
|
|
|
jobs:
|
|
|
|
|
build-1.21:
|
|
|
|
|
runs-on: docker
|
|
|
|
|
container:
|
|
|
|
|
image: alpine:3.23.3
|
|
|
|
|
steps:
|
|
|
|
|
- name: Install dependencies
|
|
|
|
|
run: apk -U add git nodejs openjdk21 tar zstd
|
|
|
|
|
|
|
|
|
|
- name: Checkout code
|
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
|
|
- name: Clone mod repo
|
|
|
|
|
run: |
|
|
|
|
|
mkdir -p deps overrides/mods
|
|
|
|
|
git clone --single-branch --branch 1.21 "https://patience.nearmisses.xyz/patience/mc_rebalance.git" "deps/mc_rebalance"
|
|
|
|
|
|
|
|
|
|
- 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: Gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
|
|
|
restore-keys: |
|
|
|
|
|
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: |
|
|
|
|
|
cp "deps/mc_rebalance/build/libs/mc_rebalance-"[0-9].[0-9].[0-9]".jar" "overrides/mods"
|
|
|
|
|
|
2026-03-23 18:16:44 +00:00
|
|
|
(cd "overrides/resources/common/required/mc_rebalance_datapack/assets/minecraft/lang/" && ./gen-langs.sh)
|
2026-03-21 00:19:47 +00:00
|
|
|
|
|
|
|
|
- name: Upload release
|
|
|
|
|
uses: https://data.forgejo.org/forgejo/upload-artifact@v4
|
|
|
|
|
with:
|
|
|
|
|
name: MC_Rebalance_2.mrpack
|
|
|
|
|
path: |
|
|
|
|
|
overrides
|
|
|
|
|
modrinth.index.json
|
|
|
|
|
!**/*.sh
|