47 lines
1.8 KiB
YAML
47 lines
1.8 KiB
YAML
name: Home Dimension Return Overlay
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: ['fix/home-dimension-return-*']
|
|
|
|
jobs:
|
|
home-dimension:
|
|
runs-on: dune-ci
|
|
steps:
|
|
- name: Check out exact revision
|
|
shell: bash
|
|
env:
|
|
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
set -euo pipefail
|
|
git init .
|
|
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/plugins.git "$GITHUB_SHA"
|
|
git checkout --detach FETCH_HEAD
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: '21'
|
|
- uses: gradle/actions/setup-gradle@v4
|
|
with:
|
|
gradle-version: '9.2.1'
|
|
- name: Test DuneEss and extract the dimension route class
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
gradle --no-daemon -p DuneEss test jar
|
|
mkdir home-dimension
|
|
PYTHONPATH=tools python3 - <<'PY'
|
|
from pathlib import Path
|
|
from plugin_home_dimension import ROUTES
|
|
from plugin_wild_update import read_archive, write_archive
|
|
source = read_archive(Path("DuneEss/build/libs/DuneRealms-Essentials.jar").read_bytes())
|
|
Path("home-dimension/donor.zip").write_bytes(write_archive({ROUTES: source[ROUTES]}))
|
|
PY
|
|
cp tools/{HomeDimensionOverlay.java,plugin_home_dimension.py,plugin_wild_update.py} home-dimension/
|
|
printf '%s\n' "$GITHUB_SHA" > home-dimension/SOURCE_COMMIT
|
|
(cd home-dimension && sha256sum -- *.zip *.py *.java SOURCE_COMMIT > SHA256SUMS)
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: DuneRealms-Home-Dimension-Return
|
|
path: home-dimension
|
|
if-no-files-found: error
|

Staff