MC/.github/workflows/build.yml
2026-10-13 05:12:57 +02:00

137 lines
4.5 KiB
YAML

name: Build DuneCore, DuneEss, and DuneTerrain
on:
workflow_dispatch:
push:
branches: [main]
jobs:
build-core:
runs-on: ubuntu-latest
defaults:
run:
working-directory: DuneRealms-minecraft-only
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Java 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: '8.14'
- name: Compile DuneCore
run: gradle clean build
- name: Upload compiled JAR
uses: actions/upload-artifact@v4
with:
name: DuneCore-Plugin
path: DuneRealms-minecraft-only/build/libs/*.jar
if-no-files-found: error
build-terrain:
runs-on: ubuntu-latest
defaults:
run:
working-directory: DuneTerrain
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Java 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: '8.14'
- name: Compile DuneTerrain
run: gradle clean build
- name: Upload compiled JAR
uses: actions/upload-artifact@v4
with:
name: DuneTerrain-Plugin
path: DuneTerrain/build/libs/*.jar
if-no-files-found: error
build-ess:
runs-on: ubuntu-latest
defaults:
run:
working-directory: DuneEss
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Java 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: '8.14'
- name: Compile DuneEss
run: gradle clean build
- name: Upload compiled JAR
uses: actions/upload-artifact@v4
with:
name: DuneEss-Plugin
path: DuneEss/build/libs/*.jar
if-no-files-found: error
package-server:
runs-on: ubuntu-latest
needs: [build-core, build-ess, build-terrain]
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Download all plugin JARs
uses: actions/download-artifact@v4
with:
pattern: Dune*-Plugin
path: DuneRealms-Server-Package
merge-multiple: true
- name: Add resource pack and install instructions
run: |
curl --fail --location --silent --show-error \
https://github.com/Foulest/Vault/releases/download/2.5.0/Vault-2.5.0.jar \
--output DuneRealms-Server-Package/Vault-2.5.0.jar
echo "3efb1c893d35807c0f3945068858a96af0f131020eee37545bdddb330044b2d9 DuneRealms-Server-Package/Vault-2.5.0.jar" | sha256sum --check --strict
curl --fail --location --silent --show-error \
https://raw.githubusercontent.com/Foulest/Vault/2.5.0/LICENSE \
--output DuneRealms-Server-Package/Vault-LICENSE.txt
cp DuneResourcePack.zip DuneRealms-Server-Package/
cat > DuneRealms-Server-Package/README.txt <<'EOF'
DuneRealms Paper server package
Contents: Vault 2.5.0, DuneCore, DuneEss, and DuneTerrain plugin JARs, plus DuneResourcePack.zip.
Install all four plugin JARs in the Paper server's plugins/ folder and restart the server.
Install the included resource pack on vanilla or Fabric 1.21.4 clients for sandworm, haunted Fremen, and spice textures.
On Fabric, put the ZIP in .minecraft/resourcepacks and enable it in Options > Resource Packs; do not put it in mods/.
DuneEss provides the Solaris economy through the included Vault API plugin.
Vault 2.5.0 is the GPL-3.0 licensed Foulest/MilkBowl Vault project; its license is included here.
Its source is available at https://github.com/Foulest/Vault/tree/2.5.0.
Compatible build target: Paper 1.21.4, Java 21.
See https://github.com/unimatrixgit/mcdune for setup and configuration details.
EOF
- name: Upload one downloadable server package
uses: actions/upload-artifact@v4
with:
name: DuneRealms-Server-Package
path: DuneRealms-Server-Package/
if-no-files-found: error
retention-days: 90