PUSHPLAY

Build and publish

Builds and checks

The one workflow file that builds, plays, checks and publishes every version of your game, and exactly what fails a build.

The workflow is optional. A game plays in PushPlay without it, from its own releases or, for a plain HTML game, from the repo. With it, every version is played before it reaches anyone, its art is rendered in every shape, it earns its Plays on and Plays with labels, and it can be listed on Discover and played in the phone app from Discover.

The workflow file

Save this as .github/workflows/pushplay.yml:

name: PushPlay

on:
  push:
    branches: ['**']
    paths-ignore: ['**/*.md']
  release:
    types: [published] # a game with "release" in its manifest is packaged from your release's own files
  workflow_dispatch:

jobs:
  pushplay:
    uses: Visual-Zone-Development/pushplay-kit/.github/workflows/build.yml@v1
    permissions:
      contents: write # publish the builds to this repo's releases
      id-token: write # online games: prove which repo built them

Or let PushPlay add it: in the launcher, Manage → Repos, pick the repo and choose Set up auto-builds. It opens a pull request with this file and, if the repo has none, a starter pushplay.json. Nothing changes until you merge it, and it’s the only thing PushPlay ever writes to GitHub.

  • Keep both permissions, whatever the game. GitHub refuses to start a shared workflow that asks for more than its caller grants.
  • Keep it in its own file. It sits beside your own release workflow and doesn’t touch it: separate file, separate releases.
  • There’s nothing to update. The build is shared by every game and pinned to v1, so improvements reach your game on its next push.

What it does

  1. Installs your packages, if the game has a package.json (commit package-lock.json).
  2. Builds the game: your npm build, build.command, the folders in build.outputs, or the repo as it is.
  3. Plays it headlessly, once for each input it lists, plus a 16:9 pass, a phone pass for a phone game, and the TV pass.
  4. Renders the art in all four shapes and takes the screenshot.
  5. Publishes the result to a release, with a zip per platform and the art as PNGs.
Pushed to Publishes to
The default branch pushplay-latest, marked pre-release so your repo’s own “Latest” is untouched
A branch named beta pushplay-beta, the game’s beta
A branch a channel names pushplay-<branch>
Any other branch Nothing: it only checks
A published release, for a game with release pushplay-latest, from that release’s own zips

Running it by hand (Actions → PushPlay → Run workflow) rebuilds every game in the repo.

Run the check yourself

The same check runs on your machine, with Node.js 20.19 or newer:

npx github:Visual-Zone-Development/pushplay-kit check

It prints ✗ problems, ⚠ notes, the TV result, and the paths of the rendered art. Nothing is written into your repo.

What fails a build

✗ problems fail the build. ⚠ notes don’t: a new game builds and plays without the things they ask for.

Every game
✗ The manifest isn’t valid, or has a field the schema doesn’t know
✗ inputs is missing or empty (a game that plays from its releases gets a ⚠)
✗ A named art file or entry doesn’t exist
✗ An entry platform has no build.outputs folder, or the other way round
✗ phones or motion listed but not used, or phone without touch
⚠ No description, no genres, a tag that’s on no list, placeholder art, controls unset, gamepad left out, art over 6 MB
A web build
✗ It crashes
✗ It loads anything from the internet, or opens a WebSocket (unless online or party, and then only to PushPlay’s relay)
✗ It opens alert, confirm or prompt
✗ A file it asks for is missing (a 404). Paths are case-sensitive
✗ The screen is still one flat colour after 30 seconds (3 seconds on the runtime files). A loading screen counts
✗ On the runtime files: a pass for a listed input fails, Start doesn’t pause, or the game binds F10
⚠ Console errors, localStorage keys without the game’s id, bars on a 16:9 screen
⚠ Anything the phone app’s content policy would block: an inline <script>, eval(), an iframe (see below)
A native build
✗ The entry isn’t a real program for its platform. Native builds aren’t played
✗ With no web build: art.cover and art.hero are missing

The TV pass never fails a build and adds no ✗ or ⚠: it prints whether the game earned the TV label, and why not (TVs).

Rules every web game follows

  • Offline. Bundle every file the game loads: fonts, scripts, sounds. No CDNs, no remote fonts, no analytics inside PushPlay. Keep those for your own release behind if (!window.pushplay).
  • No dialogs or new windows. No alert, confirm, prompt or window.open.
  • Phones are stricter. The phone app serves games with a content security policy: only the game’s own files, no inline <script> (or onclick-style attributes), no eval() or new Function(), and no iframes. WebAssembly is fine. The launcher doesn’t enforce it, so the check serves every web build with the same policy, reporting only, and adds a ⚠ for each kind of thing a phone would block. The app can’t serve pre-compressed .br or .gz files either (in Unity, turn compression off or use Decompression Fallback).
  • Threads need isolation. An engine export that uses SharedArrayBuffer needs "web": { "isolated": true }.
  • Keep it small. Aim for under 30 MB of bundled files, and music under about 3 MB a track.

Common messages

Message Fix
the game loads <url> from the internet Copy the file into the game and load it from there, or put it behind if (!window.pushplay).
the game opened a alert() dialog Draw it in the game instead.
after 30s the screen is still one flat color Draw a loading screen straight away. Look above for crashed or missing file. A threaded export needs web.isolated.
missing file: <path> (404) The page asks for a file that isn’t in the build folder. Check the path and its upper and lower case.
add "inputs" List what the whole game, menus included, plays with.
"<word>" isn't on PushPlay's lists Use a genre, or a tag from the lists.
entry.<platform> "<file>" isn't in <folder> entry is a path inside the build.outputs folder, not from the repo root.
(root) must NOT have additional properties "<name>" Remove the field, or fix its spelling.
on phones the PushPlay app blocks inline scripts … The game plays in the launcher but wouldn’t start on a phone. Move the code into a .js file the page loads (or build without eval, or draw in the game instead of an iframe).

Edit this page on GitHub · Something missing or wrong? Tell us.