plugins/.forgejo/workflows/lobby-builder-safety.yml
unimatrixgit c5550fd96c
Some checks failed
Compact Dune Menu Overlay / compact-menu-links (push) Successful in 3m4s
Profile-safe Lobby Builder / builder-safety (push) Successful in 2m9s
Reviewed Lobby Multiverse Core / multiverse-core (push) Successful in 13s
DuneRealms Plugin CI / plugins (push) Has been cancelled
DuneRealms Resourcepack CI / resourcepack (push) Failing after 17s
Package profile-safe Multiverse Builder overlays
2026-12-05 14:52:45 +01:00

51 lines
2.2 KiB
YAML

name: Profile-safe Lobby Builder
on:
workflow_dispatch:
push:
branches: ['fix/compact-menu-links-*']
jobs:
builder-safety:
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 inventory isolation and package the scoped classes
shell: bash
run: |
set -euo pipefail
gradle --no-daemon -p DuneRealms-minecraft-only test jar
gradle --no-daemon -p DuneStaff test jar
mkdir lobby-builder-safety
PYTHONPATH=tools python3 - <<'PY'
from pathlib import Path
from plugin_builder_multiverse import CORE, BUILDER, CORE_CLASSES, LEASE, BUILDER_CLASSES
from plugin_wild_update import read_archive, write_archive
for name, jar, entries in [
("core", "DuneRealms-minecraft-only/build/libs/DuneRealms-Core.jar", [CORE+n for n in CORE_CLASSES+[LEASE]]),
("builder", "DuneStaff/build/libs/DuneStaff.jar", [BUILDER+n for n in BUILDER_CLASSES])
]:
compiled=read_archive(Path(jar).read_bytes())
Path("lobby-builder-safety/"+name+".zip").write_bytes(write_archive({n:compiled[n] for n in entries}))
PY
cp tools/{plugin_builder_multiverse.py,plugin_wild_update.py,BuilderProfileCoreOverlay.java} lobby-builder-safety/
printf '%s\n' "$GITHUB_SHA" > lobby-builder-safety/SOURCE_COMMIT
(cd lobby-builder-safety && sha256sum -- *.zip *.py *.java SOURCE_COMMIT > SHA256SUMS)
- uses: actions/upload-artifact@v3
with:
name: DuneRealms-Lobby-Builder-Safety
path: lobby-builder-safety
if-no-files-found: error