Skip to content
Back to skills

Releasing

ASecurity

Releasing a new version of Hypersomnia - the order of every step (site, nginx, game tag, CI, signing, servers, web platforms), the build command of every platform, and the pitfalls that broke past releases. Use when the user says "wydajemy", "release", "tag", "wypchnij", "deploy", or asks what is left before a release.

  • 1,733 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 9, 2026
developmentgoshellbashnodedockertestinggitbackend

Works with

  • cli

Security analysis

A92/100
  • mediumUses curl or wget to download content

Pro scans all 5 files and shows the line behind each finding

Scanned November 19, 2026

npx -y skills add TeamHypersomnia/Hypersomnia --skill releasing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Releasing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Releasing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/teamhypersomnia-releasing/badge)](https://www.skillsdirectory.com/skills/teamhypersomnia-releasing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: releasing
description: Releasing a new version of Hypersomnia - the order of every step (site, nginx, game tag, CI, signing, servers, web platforms), the build command of every platform, and the pitfalls that broke past releases. Use when the user says "wydajemy", "release", "tag", "wypchnij", "deploy", or asks what is left before a release.
---

# Releasing Hypersomnia

**Never test on production (test servers, test keys in official_servers.d, ranked reports, test users) unless the user
has asked for it themselves, explicitly, in this session.**

Write the release's own checklist first (a markdown file outside the scratchpad, opened for the user in nvim) from the
order below, with the release's specifics added, and tick it off as you go. Ask the user before every step that
reaches production unless they have said to go ahead with all of them.

## Before the tag

1. **Every variant compiles** - not only the Linux one you worked in. The web build fails on code that only exists
   natively (a blocking HTTP `Post`, native sockets) and CI would only show it after the tag:
   - Linux native (debug, fast): your own `build/Debug-x64-clang-claude`
   - headless: `build/Debug-x64-clang-claude-headless`; for the servers' glibc: `scripts/build_headless_ubuntu2204.sh`
     (local-testing skill)
   - Steam: `build/Debug-x64-clang-claude-steam` (`-DDEVELOP_STEAM_INTEGRATION=1`)
   - web: `VARIANT= scripts/build_web.sh`, CrazyGames: `VARIANT=crazygames scripts/build_web.sh` (local-testing skill;
     needs emsdk - `EMSDK=<emsdk dir>`)
   - Windows and macOS: only CI builds them - read the CI result, never assume
2. **Tests** after network or server changes: the local-testing skill's `regression.sh`, the tournament suite
   (frozen copy, 4 shards), the Docker matrix if the setup scripts or the generator changed, one web run in Firefox
   (`scenario_web_firefox.sh`; the web asks for a nickname and shows the changelog on a fresh profile - click through).
3. **The changelog**: the new version's date is the release day (`## [X.Y.Z] - YYYY-MM-DD`); balance changes as tables
   (changelog skill).
4. **Forks and submodules pushed** - a submodule commit that is only local fails every CI job at checkout
   ("not our ref"): `git submodule foreach 'git log --oneline @{u}..HEAD 2>/dev/null'` must print nothing.
   The netcode fork (`src/3rdparty/yojimbo`, branch `hypersomnia-phase3`) pushes only over ssh:
   `git push git@github.com:TeamHypersomnia/yojimbo.git hypersomnia-phase3`.
5. The user's own playtest of a RelWithDebInfo build (`build/current`).

## The order of the release (do not swap)

1. **What the new game needs from the site goes first** (nginx locations, endpoints): the site repo's
   `infra/` - `ansible-playbook -i inventory/hypersomnia.io.yml playbooks/site.yml --tags nginx` (`--check --diff`
   first). Check with curl.
2. **The site stays unpushed until step 7** - a push of its master deploys it at once (GitHub Actions "Deploy to
   hypersomnia.io": nginx + homepage), and the generator writes commands for the new version. Commit it, push it at
   step 7.
3. **Tag and push the game**: `cmake/push_tag.sh X.Y.Z` (the tag first, then master - CI reads the version from the
   tag). Watch CI (`gh run list`); four builds (Windows, Linux, macOS, headless) and the Docker release on the tag.
4. **Web builds at the tag** (HEAD must be exactly at it): the user's aliases `cmkrw` (play), `cmkrwi` (itch),
   `cmkrcg` (CrazyGames) - `cmake/build.sh Release Web '-DUSE_O3=1 [-DBUILD_ITCH=1 | -DBUILD_CRAZYGAMES=1]
   -DGENERATE_DEBUG_INFORMATION=0'` with `BUILD_FOLDER_SUFFIX=release-web | release-web-itch | release-crazygames`,
   then ninja there. `cmake/build.sh` repoints `build/current` - the last one built wins.
   All three at once: `scripts/build_webs.sh X.Y.Z` (refuses if HEAD is not at the tag; logs in `$LOGS`, default
   `~/.cache/hs-release`). It deletes each folder's `generators_output/generated/hypersomnia_version.cpp` first -
   an old one baked 3.0.0 into a 4.0.0 web build - and prints the `commit_tag` each build got: check it is X.Y.Z.
   Watch CI meanwhile: `scripts/wait_ci.sh <sha>`.
5. **Sign and upload** (the user - a Trezor): `deploy_last_builds` (the admin shell repo's `sign_and_upload_last_builds
   --set-to-latest`, then `server_update` only if the upload worked). hypersomnia.io first, Steam last; steamcmd may
   need retries. Fallback: `sign_deploy_last_builds`.
   A failed upload (e.g. a mistyped Steam password - steamcmd asks for it mid-run) skips `server_update`; run it
   all again from the already downloaded binaries (`/tmp/hypersomnia-deployment`) instead of downloading anew:
   `(cd <admin shell repo> && STEAM_LOGIN=<the Steam login> UPLOAD_TO_STEAM=1 SKIP_DOWNLOADING=1 ./sign_and_upload_last_builds --set-to-latest) && server_update`.
   Without Steam: `UPLOAD_TO_STEAM=0`.
6. **The hub** (the site's host, it runs a game server too): anything the new game changes on disk that the site reads
   (e.g. 4.3.0 moved `downloads/arenas` to `downloads/maps`, which `hosting/arenas` points at) - stop the game there
   before its self-update, run the playbook's `data` tag, update, start. Then check that its game folder was not
   emptied by the self-update (4.0.0 and 4.1.0 did): restore from the site's `hosting/builds/X.Y.Z`,
   `systemctl reset-failed`, start the masterserver and the game.
   Cause (fixed 2026-10-21 in the admin shell's `remote-shell/update_hypersomnia`): both services (masterserver and
   game server) run the same AppImage and updated themselves at once into the same `.new` file. Now `server_update`
   downloads into `.server_update`, checks `--version`, swaps, then restarts. `sync_repo` rsyncs the admin shell's
   working tree - keep that fix in it (commit it).
   Check: `ssh arena 'bash -s' < scripts/hostcheck.sh` - version X.Y.Z, both processes with a fresh uptime.
7. **Deploy the site's pages**: push its master (the workflow deploys it - check `gh run list` in the site repo),
   or by hand `playbooks/homepage.yml` (or `site.yml --tags homepage`).
8. **The other official servers**: `server_update` updates only the hub. US, NL and DE: `scripts/update_other_hosts.sh
   X.Y.Z` (md5 against the hub's `hosting/builds/X.Y.Z`, swap, restart; DE has no sudo - SIGINT to the game process).
   Then all 10 official servers ([PL], [DE], [NL], [US] Central, each also as "R") on the new version:
   `curl -s https://masterserver.hypersomnia.io:8420/server_list_json` - field `server_version`. Community servers
   (e.g. [US] New York) update on their own.
9. **Steamworks**: set the new BuildID live.
10. **Docker**: `ghcr.io/teamhypersomnia/hypersomnia-server:X.Y.Z` and `:latest` exist (Docker_release.yml waits for
    the deployed AppImage).
11. **Web, after the natives**: `deploy_web` (play.hypersomnia.io), `deploy_web_itch` (butler; from `build/current` =
    release-web-itch), `cgdrag` (CrazyGames; `build/current` -> release-crazygames). All three read `build/current`:
    repoint it (`ln -sfn Release-Web-clang-<suffix> build/current`) before each, and leave it on release-crazygames
    for the user's `cgdrag`. Check: md5 of the 4 files on play.hypersomnia.io against the local build;
    `butler status Hyperdev/Hypersomnia:html` shows X.Y.Z processed.
12. **Flathub** (once the game is there - `io.hypersomnia.Hypersomnia`): the user merges the version bump PR that
    Flathub's bot opens in `flathub/io.hypersomnia.Hypersomnia` after the tag, or bumps the tag and commit by hand.
    **Never do it for them, never draft it** - Flathub forbids AI-made manifests, commits, PR texts and replies there.
    The release entries in the metainfo come from the CHANGELOG headings (`cmake/generate_metainfo.py`), nothing to do.

## After

- Maps uploaded with the release (or a map changed on the hub): servers download maps only at start - restart all
  official servers: `~/rep/servers/restart_all.sh` (the servers' config repo).
- Note the release in the release decisions file (`~/hypersomnia-phase3-decisions.md`, a "X.Y.Z - RELEASED" line).

- Smoke: the server list in the game and in the browser, a ranked match report on the site, the generator opens.
- Back up the site's DB (`dbsyncback`) - before any test on production that sends ranked reports, and after the
  first real matches.
- **Production tests only when the user asks for them themselves, explicitly, in their own words** ("testuj na produkcji").
  Never propose-and-start, never as "the next step" of a release, never because an earlier session did them: a
  release ends with the smoke checks above. Asked, they go as below.
- Production tests of the server setup scripts (4.3.0 did all of these):
  - scripts straight from hypersomnia.io/generator; on arenaus a throwaway user (`useradd -m`, `usermod -p '*'` so
    key login works, its own `authorized_keys`) or `HOME=<test folder>` - never the `ubuntu` user's `~/.config`;
    no generator systemd setup there (its unit is `hypersomnia.service`, production's name)
  - the released client (the downloaded AppImage, unpacked) - a local build past the tag is "another version"
  - make a test server official: its `--print-server-key` into the hub's `official_servers.d/<cc>-<name>` (read every
    minute) - then its ranked/tournament reports count; remove the files afterwards
  - ranked: two clients join, click Auto-assign, one is killed after the start - the abandonment's report (HTTP 200,
    a row on /matches); a new key that abandons gets no MMR row by design
  - Docker against production: `docker-matrix/run_dprod.sh` (the matrix is not in the repo - ask the user where it is) (the real ghcr image, the masterserver not blocked)
  - afterwards: test servers stopped by exact pattern (`pgrep -f "[y]ojimbo..."` - a plain pattern kills the ssh
    session), the test user deleted, production processes' uptime unchanged, test names gone from server_list_json

## Pitfalls that already happened

- A submodule commit not pushed: every CI job failed at checkout (4.3.0, yojimbo).
- The web build not compiling (4.3.0): found only because it was built before the tag.
- `/tmp` full of test runs (inodes): every command fails with ENOSPC - the scratchpad's test folders are throwaway.
- The hub's game folder emptied by the self-update (4.0.0, 4.1.0).
- Steam upload stalled ("No progress while uploading chunks") and the rest ran on: upload first, servers after.
- A web build with an old version file (4.0.0 showed 3.0.0): fixed by `build_webs.sh` deleting it.
- A mistyped Steam password (4.2.0): rerun with `SKIP_DOWNLOADING=1`, servers were not touched.
- `--appimage-extract-and-run` unpacks to the shared `/tmp/appimage_extracted_<md5>`: the first user to run a version
  blocks it for every other user ("Failed to extract AppImage") and could plant files there - the generator's
  own-user service has `PrivateTmp=yes` (4.3.0); run test servers of another user with their own `TMPDIR`.
- itch's version column: `butler push ... --userversion X.Y.Z` (without it the old number stays); a second push
  right after is refused while the first one is processing - wait for `butler status`.
- A proxied endpoint with CORS from both nginx and the backend (4.3.0 `/server_list`): two
  `Access-Control-Allow-Origin` headers, every web build refused the list. curl doesn't show it - check from a browser
  (a cross-origin `fetch` in Playwright), or `curl -D -` that the header appears once.
- DE's game process ignored SIGINT and SIGTERM (4.3.0): stuck, off the server list, the old version still running
  while `--version` of the file said the new one. `update_other_hosts.sh` now escalates to SIGKILL and prints the
  process's uptime - check it's fresh, and that all 10 official servers are in `server_list_json` with the version.
- `server_update` thought to update all servers: it updates only the hub (4.0.0-4.2.0) - `update_other_hosts.sh`.
- The site deployed before the game: the generator wrote commands the old game didn't understand - pages after the
  game, only what the new game needs (nginx) before.

Files in this skill

  • SKILL.md11.3 KB
  • scripts/build_webs.sh1.2 KB
  • scripts/hostcheck.sh425 B
  • scripts/update_other_hosts.sh2 KB
  • scripts/wait_ci.sh680 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.