Files
punktfunk-plugin-heroic/.gitea/workflows/ci.yml
T
enricobuehler 5fb6946aa1
CI / build (push) Failing after 15s
CI / publish (push) Skipped
feat: the Heroic library source
The host's in-tree Heroic scanner, lifted out into its own installable plugin
(design/library-scanner-plugins.md M5/WP5.2). One source covers all three of
Heroic's backends — legendary (Epic), gog, nile (Amazon) — because that is how
Heroic presents them and how the built-in scanner did.

The package is a config schema, a detect, a scan and a watchDirs. The store
claim, sync engine, __config surface, console registration and the
detect/scan/parity/uninstall CLI verbs all come from
@punktfunk/plugin-kit/library.

Claiming the `heroic` store keeps the entry ids the built-in scanner produced
(`heroic:<runner>:<appName>`), so GameStream app ids, Moonlight pins, cached art
and the operator's enabled/disabled state all survive the migration.

Ported behaviours worth naming, each covered by a test:

  * a title counts as installed only if Heroic says so AND its install directory
    still exists. The second check is the workaround for Heroic's GOG
    is_installed bug (#2691), without which uninstalled games linger.
  * only http(s) art is emitted. A sideloaded title can carry a local file://
    path, which — unlike a path this plugin resolved itself — is not one the host
    should proxy, and the client cannot fetch either. It degrades to the title
    card, as in-host.
  * both detect signals ride along: the install dir and the HEROIC_APP_NAME env
    marker. Heroic hands off to legendary/gogdl/nile, so the host never sees the
    game's own process any other way, and the env marker is what works under
    Proton (verified on-glass 2026-07-27). They are a union, so a Heroic version
    that stops setting it degrades rather than breaking.

The launch VALUE and the `heroic` launch kind are unchanged — the host still owns
turning `<runner>:<appName>` into a heroic://launch command, so this plugin never
constructs a command line.

Verified locally against the kit: tsc clean, biome clean, 5 tests, bundle builds,
CLI runs (detect -> absent, scan -> 0 games).

As with lutris: no lockfile and CI cannot be green until
@punktfunk/plugin-kit@0.3.0 is published. The parity gate has NOT been run — that
needs a box with Heroic installed.
2026-08-05 19:17:02 +02:00

73 lines
2.5 KiB
YAML

# CI for the lutris library source (Gitea Actions).
# build — install, lint, typecheck, unit tests, bundle.
# publish — npm publish to the Gitea registry on a `v*` tag.
#
# A library-source plugin is a SINGLE package (no contract, no UI — the console renders its
# settings from the schema the kit serves at /__config), so this is the short version of the
# playnite/rom-manager workflow.
#
# @punktfunk/* resolves from the Gitea registry via bunfig's scope map + REGISTRY_TOKEN;
# everything else (effect) comes from npm.
#
# NOT covered here, and it is the gate that actually matters: `punktfunk-plugin-lutris parity`
# against a host with Lutris installed. CI has no Lutris and no host, so parity is a release
# step run on a real box — see the README.
name: CI
on:
push:
branches: [main]
tags: ['v*']
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-24.04
container:
image: oven/bun:1
timeout-minutes: 10
steps:
# oven/bun's slim base ships neither git nor a CA bundle — actions/checkout's HTTPS fetch needs both.
- name: Install git + CA certs
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates git nodejs
- uses: actions/checkout@v4
- name: Registry auth
env:
TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: |
test -n "$TOKEN" || { echo "REGISTRY_TOKEN secret is empty"; exit 1; }
printf '//git.unom.io/api/packages/unom/npm/:_authToken=%s\n' "$TOKEN" > "$HOME/.npmrc"
- name: Install
run: bun install --frozen-lockfile
- name: Lint & format
run: bunx biome check
- name: Typecheck
run: bunx tsc --noEmit
- name: Test
run: bun test
- name: Build
run: bun run build
publish:
if: startsWith(github.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-24.04
container:
image: oven/bun:1
timeout-minutes: 10
steps:
- name: Install git + CA certs
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates git nodejs
- uses: actions/checkout@v4
- name: Registry auth
env:
TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: |
test -n "$TOKEN" || { echo "REGISTRY_TOKEN secret is empty"; exit 1; }
printf '//git.unom.io/api/packages/unom/npm/:_authToken=%s\n' "$TOKEN" > "$HOME/.npmrc"
- name: Install
run: bun install --frozen-lockfile
- name: Publish
run: bun publish --access public