47 lines
1.9 KiB
YAML
47 lines
1.9 KiB
YAML
name: Native Workstation Origin Overlay
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: ['fix/native-workstation-outputs-*']
|
|
|
|
jobs:
|
|
native-workstation:
|
|
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 JARVIS and build the producer overlay
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
gradle --no-daemon -p JarvisConnector test jar
|
|
mkdir native-workstation
|
|
PYTHONPATH=tools python3 - <<'PY'
|
|
from pathlib import Path
|
|
from plugin_native_workstation import ENTRY, NEW
|
|
from plugin_wild_update import read_archive, write_archive
|
|
source = read_archive(Path("JarvisConnector/build/libs/jarvistranslator.jar").read_bytes())
|
|
Path("native-workstation/donor.zip").write_bytes(write_archive({entry: source[entry] for entry in [ENTRY, *NEW]}))
|
|
PY
|
|
cp tools/{NativeWorkstationMerge.java,plugin_native_workstation.py,plugin_wild_update.py} native-workstation/
|
|
printf '%s\n' "$GITHUB_SHA" > native-workstation/SOURCE_COMMIT
|
|
(cd native-workstation && sha256sum -- *.zip *.py *.java SOURCE_COMMIT > SHA256SUMS)
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: DuneRealms-Native-Workstation-Origin
|
|
path: native-workstation
|
|
if-no-files-found: error
|

Staff