From 25bf1d28890906edeeb173a0cd9564333b2cd005 Mon Sep 17 00:00:00 2001 From: cardillan <122014763+cardillan@users.noreply.github.com> Date: Mon, 14 Sep 2026 19:49:17 +0200 Subject: [PATCH 1/4] Automate release builds --- .github/workflows/commitTest.yml | 2 +- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/commitTest.yml b/.github/workflows/commitTest.yml index 34bc3b50..f769da76 100644 --- a/.github/workflows/commitTest.yml +++ b/.github/workflows/commitTest.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Set up PATH run: | echo "${ANDROID_HOME}/build-tools/34.0.0" >> $GITHUB_PATH diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..bd70fc4b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Release Mod + +on: + release: + types: [published] + +permissions: + contents: write + +jobs: + buildJar: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v7 + - name: Set up PATH + run: | + echo "${ANDROID_HOME}/build-tools/34.0.0" >> $GITHUB_PATH + - name: Set up JDK 17 + uses: actions/setup-java@v5 + with: + distribution: 'temurin' + java-version: 17 + - name: Build mod jar + run: | + chmod +x ./gradlew + ./gradlew deploy + - name: Upload release artifact + env: + GH_TOKEN: ${{ github.token }} + run: | + gh release upload "${{ github.event.release.tag_name }}" \ + "build/libs/${{ github.event.repository.name }}.jar" \ + --clobber From 5a3b8c8aae3ca16e4835bcc1eedb5256ea55ed7c Mon Sep 17 00:00:00 2001 From: cardillan <122014763+cardillan@users.noreply.github.com> Date: Mon, 14 Sep 2026 19:57:54 +0200 Subject: [PATCH 2/4] Automate release builds --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index e1e43c32..55ec3a8f 100644 --- a/build.gradle +++ b/build.gradle @@ -77,6 +77,7 @@ jar{ from(projectDir){ include "mod.hjson" + include "icon.png" } from("assets/"){ From f7f351853959a5e1bdd0e49771c98a3c7f7a4250 Mon Sep 17 00:00:00 2001 From: cardillan <122014763+cardillan@users.noreply.github.com> Date: Mon, 14 Sep 2026 20:07:13 +0200 Subject: [PATCH 3/4] Update Readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 78a4f45d..64c3580c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ # Mindustry Java Mod Template A Java Mindustry mod template that works on Android and PC. The Kotlin version of this mod can be seen [here](https://github.com/Anuken/MindustryKotlinModTemplate). +## Publishing a release + +A Java mod needs to have at least one published release containing the mod jar file to be available by the mod browser in Mindustry. To create a release, tag a commit and create and publish a release on Github. There is a Github Actions workflow that will automatically build the mod for the release, so you don't need to manually build and upload anything. + ## Building for Desktop Testing 1. Install JDK **17**. From 8d0c4ee1ed6ed9c0ef5e791e23bb94341221949b Mon Sep 17 00:00:00 2001 From: cardillan <122014763+cardillan@users.noreply.github.com> Date: Tue, 15 Sep 2026 08:44:30 +0200 Subject: [PATCH 4/4] Update Readme: include more information about the mod scrapper --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 64c3580c..88f00953 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,18 @@ # Mindustry Java Mod Template A Java Mindustry mod template that works on Android and PC. The Kotlin version of this mod can be seen [here](https://github.com/Anuken/MindustryKotlinModTemplate). -## Publishing a release +## Registering the mod with Mindustry Mod Browser -A Java mod needs to have at least one published release containing the mod jar file to be available by the mod browser in Mindustry. To create a release, tag a commit and create and publish a release on Github. There is a Github Actions workflow that will automatically build the mod for the release, so you don't need to manually build and upload anything. +The list of mods displayed in the Mod Browser is [created automatically](https://github.com/Anuken/MindustryMods). For your mod to be included, the following criteria need to be met: + +- Must have a valid `mod.json` / `mod.hjson` file in the root or `assets/` directory. +- Must have the `mindustry-mod` topic. Do **NOT** use the `mindustry-mod-v7` or `mindustry-mod-v8` topics, they are ignored! +- Must have a `minGameVersion` >= `136` in `mod.json`. +- Must have a release published, containing the compiled mod as an asset. This template ensures this asset is created automatically when a release is published, just creating and publishing a release is enough. + +### Opting Out + +If you would like to remove your mod from the public browser, add `hideBrowser: true` to your `mod.json` / `mod.hjson`. ## Building for Desktop Testing