This commit is contained in:
parent
ebbe63d670
commit
8409ce27d4
66
.forgejo/workflows/build.yaml
Normal file
66
.forgejo/workflows/build.yaml
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'overrides/*'
|
||||
- 'modrinth.index.json'
|
||||
- '.forgejo/workflows/build.yaml'
|
||||
jobs:
|
||||
build-main:
|
||||
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 main "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: 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: |
|
||||
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:
|
||||
name: MC_Rebalance_2.mrpack
|
||||
path: |
|
||||
overrides
|
||||
modrinth.index.json
|
||||
!**/*.sh
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
# Simply copies en_us.json to other standard english variants
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue