15d3d423fa
apple / swift (push) Successful in 56s
ci / rust (push) Successful in 1m48s
android / android (push) Successful in 2m11s
ci / web (push) Successful in 27s
ci / docs-site (push) Successful in 28s
deb / build-publish (push) Successful in 2m24s
decky / build-publish (push) Successful in 12s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 7s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 5s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 5s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 5s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 3s
ci / bench (push) Successful in 4m32s
flatpak / build-publish (push) Successful in 4m1s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m18s
docker / deploy-docs (push) Successful in 18s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 7m43s
The plugin was a QAM launcher whose stream never appeared, with no
pairing. Three fixes, plus a headless --pair mode on the GTK client:
- Stream actually starts (MoonDeck's proven mechanism): gamescope only
focuses the process tree Steam launched via reaper, so a flatpak
spawned from the (root) backend is invisible. The frontend now
registers ONE hidden non-Steam shortcut pointing at bin/punktfunkrun.sh,
passes the host as the shortcut's Steam launch options, and starts it
with SteamClient.Apps.RunGame — gamescope then fullscreen-focuses it.
The wrapper execs `flatpak run io.unom.Punktfunk --connect <host>`.
- Fullscreen page: routerHook.addRoute("/punktfunk") — host list,
per-host Pair/Stream, and a settings section (resolution/refresh/
bitrate/gamepad/mic, written to client-gtk-settings.json).
- Pairing: a gamepad-navigable PIN keypad. The host shows the PIN; the
backend runs the SPAKE2 ceremony headlessly via the client's new
`--pair <PIN> --connect host` CLI mode (app.rs), persisting the host
as paired so the stream then connects silently. Same flatpak =>
shared identity store, verified live (ceremony against a real host).
- Backend (main.py): discover / pair / runner_info / get_settings /
set_settings / kill_stream; uses DECKY_USER_HOME so paths resolve to
the deck user's flatpak install regardless of the plugin's root flag.
CI (decky.yml) and the sideload packager now ship bin/punktfunkrun.sh.
The Steam-shortcut launch and headless-pairing env follow MoonDeck
exactly but need a Deck in Gaming Mode to fully confirm.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
131 lines
5.9 KiB
YAML
131 lines
5.9 KiB
YAML
# Build the punktfunk Decky Loader plugin (Gaming-Mode QAM launcher) into a distribution zip
|
|
# and publish it to Gitea's GENERIC package registry, giving Decky's "install from URL" a
|
|
# stable link. On tags the zip is ALSO attached to the Gitea release.
|
|
#
|
|
# PUT/GET https://git.unom.io/api/packages/unom/generic/punktfunk-decky/<version>/punktfunk.zip
|
|
#
|
|
# The plugin backend is PURE PYTHON (clients/decky/main.py — no compiled binary), so we do NOT
|
|
# need the Decky CLI (which requires Docker + rust-nightly only to compile native backends).
|
|
# We build the frontend with pnpm and assemble the store-layout zip by hand:
|
|
#
|
|
# punktfunk.zip
|
|
# punktfunk/ <- single top-level dir == plugin.json "name"
|
|
# plugin.json [required]
|
|
# package.json [required]
|
|
# main.py [required: python backend]
|
|
# dist/index.js [required: rollup output]
|
|
# README.md (recommended)
|
|
# LICENSE [required by the plugin store]
|
|
#
|
|
# REGISTRY_TOKEN: repo Actions secret, a PAT with write:package scope (shared with deb/rpm/docker).
|
|
name: decky
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags: ['v*']
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
REGISTRY: git.unom.io
|
|
OWNER: unom
|
|
PACKAGE: punktfunk-decky # generic-registry package name
|
|
PLUGIN: punktfunk # plugin.json "name" == zip top-level dir
|
|
|
|
jobs:
|
|
build-publish:
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 30
|
|
container:
|
|
image: node:22-bookworm # node + corepack(pnpm); matches the @decky toolchain
|
|
defaults:
|
|
run:
|
|
working-directory: clients/decky
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: pnpm
|
|
run: |
|
|
corepack enable
|
|
# The repo's pnpm-lock.yaml + package.json devDeps target pnpm 9 (the version the
|
|
# @decky toolchain and the local build use). Pin it so --frozen-lockfile holds.
|
|
corepack prepare pnpm@9 --activate
|
|
|
|
- name: Build frontend
|
|
run: |
|
|
pnpm install --frozen-lockfile
|
|
pnpm run build # rollup -> clients/decky/dist/index.js
|
|
|
|
- name: Version
|
|
# Tag v1.2.3 -> 1.2.3; main push -> 0.0.1-ciN.g<sha>. Used only for the registry
|
|
# version path + the zip name (the plugin.json version is the source of truth Decky
|
|
# reads after install).
|
|
working-directory: ${{ gitea.workspace }}
|
|
run: |
|
|
SHORT=$(echo "$GITHUB_SHA" | cut -c1-8)
|
|
case "$GITHUB_REF" in
|
|
refs/tags/v*) V="${GITHUB_REF_NAME#v}" ;;
|
|
*) V="0.0.1-ci${GITHUB_RUN_NUMBER}.g${SHORT}" ;;
|
|
esac
|
|
echo "VERSION=$V" >> "$GITHUB_ENV"
|
|
echo "decky version $V"
|
|
|
|
- name: Assemble store-layout zip
|
|
working-directory: ${{ gitea.workspace }}
|
|
run: |
|
|
apt-get update && apt-get install -y --no-install-recommends zip >/dev/null
|
|
STAGE="$RUNNER_TEMP/decky"
|
|
DEST="$STAGE/$PLUGIN"
|
|
rm -rf "$STAGE"; mkdir -p "$DEST/dist" "$DEST/bin"
|
|
cp clients/decky/plugin.json "$DEST/"
|
|
cp clients/decky/package.json "$DEST/"
|
|
cp clients/decky/main.py "$DEST/"
|
|
cp clients/decky/dist/index.js "$DEST/dist/"
|
|
cp clients/decky/README.md "$DEST/"
|
|
# The stream-launch wrapper (target of the Steam shortcut); keep it executable
|
|
# (runner_info() also re-chmods at runtime in case the zip/extract drops the bit).
|
|
cp clients/decky/bin/punktfunkrun.sh "$DEST/bin/"
|
|
chmod 0755 "$DEST/bin/punktfunkrun.sh"
|
|
# Store requires a LICENSE in the plugin root; the project is MIT OR Apache-2.0.
|
|
cp LICENSE-MIT "$DEST/LICENSE"
|
|
( cd "$STAGE" && zip -r "$RUNNER_TEMP/punktfunk.zip" "$PLUGIN" )
|
|
ls -lh "$RUNNER_TEMP/punktfunk.zip"
|
|
unzip -l "$RUNNER_TEMP/punktfunk.zip"
|
|
|
|
- name: Publish to the Gitea generic registry
|
|
working-directory: ${{ gitea.workspace }}
|
|
env:
|
|
TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
|
run: |
|
|
BASE="https://$REGISTRY/api/packages/$OWNER/generic/$PACKAGE"
|
|
# 1) Immutable, versioned URL.
|
|
curl -fsS --user "enricobuehler:$TOKEN" --upload-file "$RUNNER_TEMP/punktfunk.zip" \
|
|
"$BASE/$VERSION/punktfunk.zip"
|
|
echo "published $BASE/$VERSION/punktfunk.zip"
|
|
# 2) Stable `latest/punktfunk.zip` — this is the link to paste into Decky's
|
|
# "install from URL". The generic registry rejects re-uploading an existing
|
|
# version/file (409), so delete the prior `latest` first (ignore 404 on run #1).
|
|
curl -fsS -o /dev/null --user "enricobuehler:$TOKEN" -X DELETE \
|
|
"$BASE/latest/punktfunk.zip" || true
|
|
curl -fsS --user "enricobuehler:$TOKEN" --upload-file "$RUNNER_TEMP/punktfunk.zip" \
|
|
"$BASE/latest/punktfunk.zip"
|
|
echo "install-from-URL link: $BASE/latest/punktfunk.zip"
|
|
|
|
- name: Attach zip to the Gitea release (tags only)
|
|
if: startsWith(gitea.ref, 'refs/tags/')
|
|
working-directory: ${{ gitea.workspace }}
|
|
env:
|
|
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
API="${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}"
|
|
ID=$(curl -sf -X POST "$API/releases" \
|
|
-H "Authorization: token $TOKEN" -H 'Content-Type: application/json' \
|
|
-d "{\"tag_name\":\"$GITHUB_REF_NAME\",\"name\":\"$GITHUB_REF_NAME\"}" \
|
|
| python3 -c 'import json,sys;print(json.load(sys.stdin)["id"])' \
|
|
|| curl -sf "$API/releases/tags/$GITHUB_REF_NAME" -H "Authorization: token $TOKEN" \
|
|
| python3 -c 'import json,sys;print(json.load(sys.stdin)["id"])')
|
|
curl -sf -X POST "$API/releases/$ID/assets?name=punktfunk-${VERSION}.zip" \
|
|
-H "Authorization: token $TOKEN" \
|
|
-F "attachment=@$RUNNER_TEMP/punktfunk.zip" >/dev/null
|
|
echo "attached punktfunk-${VERSION}.zip to release $GITHUB_REF_NAME"
|