Clarifies that releases ship ONLY the recompiled binaries (skate3 + librexruntime + ghost_relay + README) - never the game files; the game dump (default.xex + EAWebkit.xex) is required at BUILD TIME for codegen only. - tools/release/release.sh: builds + packages a per-platform release zip (configure -> codegen -> build -> zip), prints a sha256sum, and with --upload creates/updates a Forgejo Release and attaches the zip via the API (GITEA_TOKEN). Supports linux/windows/macos presets on their native hosts. - .forgejo/workflows/release.yml: optional automation - builds on a self-hosted Docker runner (ubuntu-24.04 label), self-heals the broken nested submodule pins via tools/ci/init-submodules.sh, and publishes a Linux release on v* tags. Needs the game dump mounted on the runner (codegen only, never uploaded), SUBMODULE_KEY + RELEASE_TOKEN secrets. - tools/ci/init-submodules.sh: recursive submodule init that self-heals upstream pins a fresh clone can no longer fetch (the rexglue fork pins thirdparty/imgui to a commit ocornut/imgui dropped; the script checks out the upstream default tip for any nested submodule left empty). - docs/releases.md: what's in a release, the local path, and the optional CI path. - .gitignore: keep tools/ci + tools/release, ignore local release zips.
126 lines
No EOL
4.6 KiB
YAML
126 lines
No EOL
4.6 KiB
YAML
name: release
|
|
|
|
# Builds a Linux release of the game and attaches it to a Forgejo/Gitea
|
|
# Release, so players can download a ready-to-run build and only need to
|
|
# bring their own Skate 3 ISO (the built-in installer extracts it).
|
|
#
|
|
# Runs on the self-hosted runner (see tools/ci/setup_runner.sh and
|
|
# docs/ci-releases.md). The runner must have the extracted game dump at
|
|
# /opt/skate3-game (default.xex + data/webkit/EAWebkit.xex, and optionally
|
|
# the TU_12K2276_* title-update package). The game files are used only for
|
|
# codegen; they are NOT bundled into the release artifact.
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-linux:
|
|
# Match this label to your self-hosted runner's label (Docker runners
|
|
# commonly use ubuntu-latest / ubuntu-22.04 / ubuntu-24.04).
|
|
runs-on: ubuntu-24.04
|
|
env:
|
|
GAME_ROOT: /opt/skate3-game
|
|
steps:
|
|
- name: Checkout
|
|
uses: https://code.forgejo.org/actions/checkout@v4
|
|
with:
|
|
# Submodules are initialized manually so we can self-heal the
|
|
# broken upstream pins (see tools/ci/init-submodules.sh).
|
|
submodules: false
|
|
|
|
- name: Init submodules
|
|
shell: bash
|
|
env:
|
|
SUBMODULE_KEY: ${{ secrets.SUBMODULE_KEY }}
|
|
run: |
|
|
set -euo pipefail
|
|
# SSH key for the self-hosted rexglue fork submodule
|
|
# (git@git.mithraic.cloud:ad3laid3/rexglue-skate3.git).
|
|
if [ -n "${SUBMODULE_KEY:-}" ]; then
|
|
mkdir -p ~/.ssh && chmod 700 ~/.ssh
|
|
printf '%s\n' "$SUBMODULE_KEY" > ~/.ssh/id_ed25519
|
|
chmod 600 ~/.ssh/id_ed25519
|
|
ssh-keyscan git.mithraic.cloud >> ~/.ssh/known_hosts 2>/dev/null || true
|
|
fi
|
|
git submodule update --init --jobs 4
|
|
bash tools/ci/init-submodules.sh
|
|
|
|
- name: Install build dependencies
|
|
shell: bash
|
|
run: |
|
|
# Docker runner containers usually run as root (no sudo).
|
|
if command -v sudo >/dev/null 2>&1 && [ "$(id -u)" != 0 ]; then
|
|
APT="sudo apt-get"
|
|
else
|
|
APT="apt-get"
|
|
fi
|
|
$APT update
|
|
$APT install -y --no-install-recommends \
|
|
git cmake ninja-build pkg-config p7zip-full zip \
|
|
clang-20 lld-20 \
|
|
libgtk-3-dev libx11-xcb-dev \
|
|
libvulkan-dev vulkan-tools mesa-vulkan-drivers \
|
|
libasound2-dev libpulse-dev libpipewire-0.3-dev libudev-dev
|
|
|
|
- name: Configure
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
TU=""
|
|
if compgen -G "$GAME_ROOT"/TU_12K2276_* >/dev/null; then
|
|
TU="-DSKATE3_TITLE_UPDATE_PACKAGE=$(compgen -G "$GAME_ROOT"/TU_12K2276_* | head -1)"
|
|
fi
|
|
echo "TU_ARGS=$TU" >> "$GITHUB_ENV"
|
|
cmake --preset linux-relwithdebinfo -DSKATE3_GAME_DATA_ROOT="$GAME_ROOT" $TU
|
|
|
|
- name: Generate recompiled code
|
|
shell: bash
|
|
run: cmake --build --preset linux-relwithdebinfo --target generate-all --parallel
|
|
|
|
- name: Reconfigure (generated sources)
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
TU="${TU_ARGS:-}"
|
|
cmake --preset linux-relwithdebinfo -DSKATE3_GAME_DATA_ROOT="$GAME_ROOT" $TU
|
|
|
|
- name: Build
|
|
shell: bash
|
|
run: cmake --build --preset linux-relwithdebinfo --parallel
|
|
|
|
- name: Package release zip
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
OUT="out/build/linux-relwithdebinfo"
|
|
VER="${GITHUB_REF_NAME#v}"
|
|
[ -n "$VER" ] || VER="dev"
|
|
NAME="Skate3Recomp-Linux-$VER"
|
|
STAGE="$NAME"
|
|
rm -rf "$STAGE"; mkdir -p "$STAGE"
|
|
cp "$OUT/skate3" "$STAGE/"
|
|
cp "$OUT/librexruntime.so" "$STAGE/" 2>/dev/null || true
|
|
cp "$OUT/ghost_relay" "$STAGE/" 2>/dev/null || true
|
|
# Title-update patches staged next to the binary when the build
|
|
# used the TU package (the CMake stage target places them here).
|
|
if [ -f "$OUT/game/default.xexp" ]; then
|
|
mkdir -p "$STAGE/game/data/webkit"
|
|
cp "$OUT/game/default.xexp" "$STAGE/game/"
|
|
cp "$OUT/game/data/webkit/EAWebkit.xexp" "$STAGE/game/data/webkit/" 2>/dev/null || true
|
|
fi
|
|
cp README.md "$STAGE/" 2>/dev/null || true
|
|
zip -r "$NAME.zip" "$STAGE"
|
|
echo "ARTIFACT=$NAME.zip" >> "$GITHUB_ENV"
|
|
|
|
- name: Publish release
|
|
uses: https://code.forgejo.org/forgejo/release-action@v2
|
|
with:
|
|
token: ${{ secrets.RELEASE_TOKEN }}
|
|
files: ${{ env.ARTIFACT }}
|
|
tag: ${{ github.ref_name }}
|
|
title: "Skate 3 Recomp ${{ github.ref_name }}"
|
|
draft: false
|
|
prerelease: false |