Releasing
There are three kinds of GitHub releases in hypemystream/hypemystream:
| Release | What it holds | How it is made |
|---|---|---|
v<version> (e.g. v0.4.0) |
The Windows installer HypeMyStream-<version>-setup.exe, its .blockmap and latest.yml |
Automatically, by .github/workflows/release.yml, when a v* tag is pushed |
mods-v1 |
The 85 original mod packages <gameId>-<modVersion>.zip and index.json |
By hand, with gh (below). The app downloads mods from here. |
web-games-v1 |
The 3 hosted web games <gameKey>-<version>.zip (Dropper, Strimmer, Leaf Blower) and index.json |
By hand, with tools/package-web-games.py and gh (below). The app downloads a game from here on its first launch. |
The release workflow only reacts to tags that start with v, so it never changes mods-v1 or web-games-v1.
Before the first release
- Create the
mods-v1andweb-games-v1releases before you announce the app (see below). Until they exist, every mod install and the first launch of every hosted web game fail. - Decide about the PowerWash Simulator package before you upload it: it contains 63 Unity engine assemblies
(
BepInEx/unity-libs/UnityEngine.*Module.dll), which belong to Unity Technologies. BepInEx can download those itself (UnityBaseLibrariesSourcein itsBepInEx.cfg), so a package without that folder should still work, but that has not been tested. A rebuilt package needs a newmodVersion, sha256 and size ingames.json. - Test once on a clean Windows PC:
npm ci,npm run dev,npm run dist:win, install the exe, then click through first run (the username prompt), Go LIVE with the offline simulation, one overlay in OBS and one mod install from the release. - The app keeps the official app’s identity (
appId: com.hypemystream.desktop, thehypemystream://link scheme and thehypemystreamdata folder). Installing it replaces an existing official install and uses its data folder. ChangeappId,productNameand the scheme inapps/desktop/electron-builder.ymlandapps/desktop/src/main/api-client.tsif both should be installable side by side.
App release
- Set the new version in
apps/desktop/package.json("version") and updatepackage-lock.json(npm install --package-lock-only). - Check that
npm run buildandnpm testpass, and commit. -
Tag and push:
git tag v0.4.0 git push origin main v0.4.0 - The workflow builds on
windows-latestwithnpm ciandnpm run dist:win, creates the GitHub release for the tag if it does not exist yet (with generated notes), and uploads the installer. It only uses the built-inGITHUB_TOKEN. Edit the release notes on GitHub afterwards if you like.
The installer is not code-signed. To sign it, provide a certificate to electron-builder (CSC_LINK and
CSC_KEY_PASSWORD as repository secrets, passed to the “Build installer” step).
Mod packages (mods-v1)
The bundled catalog (apps/desktop/resources/catalog/games.json) points every mod at
https://github.com/hypemystream/hypemystream/releases/download/mods-v1/<gameId>-<modVersion>.zip
and stores its modSha256 and modSize. The app refuses a download whose sha256 does not match, so the files on the
release must be exactly the ones the catalog was built from. They are not in git (they are about 680 MB).
tools/import-original-catalog.py writes them into a release-assets folder of your choice, as mods/*.zip plus
mods/index.json:
python3 -I tools/import-original-catalog.py <original-assets> apps/desktop/resources/catalog <release-assets>
Below, <release-assets> is that folder. You need the GitHub CLI signed in with write
access to the repository (gh auth login).
First upload
gh release create mods-v1 --repo hypemystream/hypemystream \
--title "Original mod packages" \
--notes "Mod packages for the HypeMyStream game library. The app downloads them on demand; do not rename files." \
--latest=false \
<release-assets>/mods/*.zip <release-assets>/mods/index.json
--latest=false keeps the app release marked as the latest release on the Releases page.
Re-upload or add packages
To replace files that are already there (same names), or to add missing ones:
gh release upload mods-v1 --repo hypemystream/hypemystream --clobber \
<release-assets>/mods/*.zip <release-assets>/mods/index.json
To upload a single package, name just that file. If a mod changes, give it a new modVersion (and so a new file
name) and update games.json with the new version, sha256 and size, rather than replacing a file in place: installed
copies of the app check the old hash.
Check the upload
gh release view mods-v1 --repo hypemystream/hypemystream --json assets --jq '.assets | length' # 86 (85 zips + index.json)
To check a file end to end, download it and compare its sha256 with the catalog:
gh release download mods-v1 --repo hypemystream/hypemystream --pattern '<gameId>-<modVersion>.zip' --dir /tmp/mods-check
shasum -a 256 /tmp/mods-check/*.zip
Hosted web games (web-games-v1)
HMS - Dropper, HMS - Strimmer and HMS - Leaf Blower (engine: "hms-remote") are browser games that the original app
loaded from HypeMyStream’s servers. The self-hosted app downloads them from this release on first launch and serves
them from its local server. The catalog gives each one a webGame field:
"webGame": {
"url": "https://github.com/hypemystream/hypemystream/releases/download/web-games-v1/<gameKey>-<version>.zip",
"sha256": "…",
"size": 36555823,
"version": "1.0"
}
The app refuses a zip whose size or sha256 differs, so the files on the release must be exactly the ones the catalog was built from. They are not in git (about 98 MB together).
| File | Game | Files in the zip | Size |
|---|---|---|---|
dropper-1.0.zip |
HMS - Dropper | 4 | 385,806 bytes |
strimmer-1.0.zip |
HMS - Strimmer | 45 | 36,555,823 bytes |
leaf-blower-1.0.zip |
HMS - Leaf Blower | 62 | 60,679,102 bytes |
index.json |
gameId, gameKey, version, file name, sha256, size and file count of each zip |
Each zip holds the game’s folder as the browser loaded it (index.html at the zip root, plus assets/), unchanged.
Build the zips
You need a capture of each game: a folder with capture-report.json (every file with its sha256) and the files
under site/<host>/play/<gameKey>/. tools/package-web-games.py checks every file against the report (it stops
on a missing, extra or changed file; .DS_Store files are skipped) and writes deterministic zips (sorted entries,
fixed timestamps and permissions), so the same capture always gives the same sha256:
python3 -I tools/package-web-games.py --out <release-assets>/web-games \
<dropper-capture> <strimmer-capture> <leaf-blower-capture>
It prints each zip’s size and sha256 and writes <release-assets>/web-games/index.json. Compare them with the
webGame records in games.json. If they differ (a new capture or version), point the catalog at the new zips:
python3 -I tools/import-web-games.py apps/desktop/resources/catalog <release-assets>/web-games/index.json \
--add <leaf-blower-capture>
--add imports a hosted game that is not in the original 0.3.150 catalog (Leaf Blower): its record, its commands
and its artwork, converted to WebP (needs Pillow). Run tools/import-web-games.py again after every
tools/import-original-catalog.py run (with --add), because that one rewrites games.json from the original 112
rows, without Leaf Blower and the webGame fields.
Upload
gh release create web-games-v1 --repo hypemystream/hypemystream \
--title "Hosted web games" \
--notes "The original HypeMyStream hosted web games (Dropper, Strimmer, Leaf Blower). The app downloads them on first launch; do not rename files." \
--latest=false \
<release-assets>/web-games/*.zip <release-assets>/web-games/index.json
To replace or add files later, use gh release upload web-games-v1 --clobber with the same files, as for
mods-v1. If a game changes, package it with a new --version (and so a new file name) and update games.json
rather than replacing a zip in place: installed copies of the app check the old hash. The app then downloads the
new version on the next launch and deletes the old one.
Check the upload
gh release view web-games-v1 --repo hypemystream/hypemystream --json assets --jq '.assets | length' # 4 (3 zips + index.json)
gh release download web-games-v1 --repo hypemystream/hypemystream --pattern '*.zip' --dir /tmp/web-games-check
shasum -a 256 /tmp/web-games-check/*.zip
The sums must match the webGame.sha256 values in games.json. Then launch each game once in the app with a
fresh data folder.