Releases
How sculk.network, OAuthMC and sculkworm get from main to the people who run them. AGENTS.md holds the short rules; this guide holds the model and the steps. The release workflow does the work, and scripts/release.mjs decides what it publishes.
Channels#
| Channel | Comes from | When | Version | Image tags | GitHub Release |
|---|---|---|---|---|---|
| dev.sculk.network | main |
Every merge | 0.0.0-dev |
:dev, :sha-<7> |
None |
| Nightly | main |
Every night at 03:17 UTC, if something changed and ci-ok passed |
0.3.0-nightly.20261126.57 |
:nightly, the version |
Pre-release |
| Stable | A nightly, unchanged | When a maintainer decides | 0.3.0 |
:latest, :0.3, from 1.0.0 also :1, the version |
Latest (sculk.network only) |
A nightly carries the number of the next stable release (one minor above the last one), then the date and the run number. By SemVer, 0.3.0-nightly.… sorts after 0.2.0 and before 0.3.0.
A stable release is a nightly that people already ran: the workflow publishes the exact commit of the latest nightly, it does not take what main holds that day.
Until 1.0.0, stable is the public beta: a minor release (0.3.0 after 0.2.0) may change the API, the plugin format, sculk.json or the settings, and its notes say how. Migrations always upgrade the data. From 1.0.0, stable follows SemVer: removing or breaking anything a user relies on takes a new major version.
Products#
sculk.network, OAuthMC and sculkworm each have their own version, tags and images. A product gets a nightly only when something in its image changed since its last one, and its release notes list only the commits that touched it.
| Product | Tag | Image | Built from |
|---|---|---|---|
| sculk.network | v0.3.0 |
ghcr.io/yellowumbrelladev/sculk.network |
The root Dockerfile: apps/server, apps/web, packages, plugins, clients/sync, the OAuthMC and sculkworm JS SDKs |
| OAuthMC | oauthmc-v0.3.0 |
ghcr.io/yellowumbrelladev/oauthmc |
crates/oauthmc |
| sculkworm | sculkworm-v0.3.0 |
ghcr.io/yellowumbrelladev/sculkworm |
crates/sculkworm |
No file in the repository holds a version. The workflow stamps it into the image: sculk.network reads SCULK_VERSION and reports it in /healthz, GET /api/build and the User-Agent; the crate images carry it in the org.opencontainers.image.version label. Cargo.toml stays at 0.1.0, and the crates are not published to crates.io. The Releases page is the changelog.
Only a stable sculk.network release becomes the Latest release on GitHub. A crate's stable release does not.
Branches#
| Branch | Holds | Who writes to it |
|---|---|---|
main |
The next release. Every PR targets it, and it is the default branch | PRs, by squash merge |
release-<product>-X.Y |
Fixes for an older stable line, such as release-sculk-0.3 |
Fix PRs, only when needed |
No branch tracks what is released: the tags do (v0.3.0, oauthmc-v0.3.0), and the Releases page marks the newest sculk.network release as Latest. Nobody pushes to main or tags by hand. The one push a person makes by hand is the first one to a release branch, which creates it from a stable tag; see Fix a stable release.
Publish a nightly#
Nothing to do: the workflow runs every night. To publish one now, for example to test a fix on a nightly instance, run release from the Actions tab on main with channel nightly, or:
gh workflow run release --ref main -f channel=nightly -f product=allThe run plans first and prints what it will publish and what it skips:
v0.3.0-nightly.20261126.57 from 1a2b3c4d…
ghcr.io/yellowumbrelladev/sculk.network:0.3.0-nightly.20261126.57
ghcr.io/yellowumbrelladev/sculk.network:nightly
Notice: OAuthMC: nothing in its image changed since oauthmc-v0.1.0-nightly.20261125.50.When ci-ok has not passed on the head of main, it publishes nothing.
To pull a bad nightly, delete its GitHub Release and tag, and point :nightly back at the previous one:
gh release delete v0.3.0-nightly.20261126.57 --cleanup-tag --yes
docker buildx imagetools create -t ghcr.io/yellowumbrelladev/sculk.network:nightly \
ghcr.io/yellowumbrelladev/sculk.network:0.3.0-nightly.20261125.50Publish a stable release#
-
Pick the nightly. The default rule: it has run for seven days, on dev.sculk.network and on at least one nightly instance, with no open issue that blocks it. Look at its notes on the Releases page and at what is still behind a feature stage.
-
Run release from the Actions tab on
mainwithchannelstableand the product. Leaveversionempty to publish the version the nightly previews (0.3.0for0.3.0-nightly.…), or type a higher one, such as1.0.0for the first stable release:gh workflow run release --ref main -f channel=stable -f product=sculkOnly someone with the admin or maintain role on the repository can run it. GitHub has no approval step for environments of a private repository on the Free plan, so the plan checks the role of whoever started the run and stops otherwise:
Error: A stable release takes the admin or maintain role on the repository, and someone has write. -
Check the result: the GitHub Release exists, and the image answers with the version.
docker run --rm -d --name check -p 8081:8080 ghcr.io/yellowumbrelladev/sculk.network:0.3.0 curl -s http://localhost:8081/healthz docker rm -f check{"ok":true,"version":"0.3.0","commit":"1a2b3c4d…"}
The planner promotes the latest nightly of that product, so publish it before a newer nightly replaces it, or wait for the next one. It refuses a nightly that a stable release already shipped (wait for the next nightly) and a version lower than the one the nightly previews.
When a run fails halfway, for example after the image is pushed but before the GitHub Release exists, open it and choose Re-run failed jobs. Every step skips what the first attempt finished, and the floating tags (:latest, :0.3, :nightly) move only at the end, so people who follow them never get an image without its release.
Documentation site#
After a stable release finishes, the release workflow dispatches deploy-docs-stable, which rebuilds https://docs.sculk.network from each product's latest stable tag (vX.Y.Z, oauthmc-vX.Y.Z, sculkworm-vX.Y.Z). The deploy runs in its own concurrency group so a docs failure never stalls or marks a release as failed. The Cloudflare API token lives in the docs environment as CLOUDFLARE_DOCS_TOKEN (see Documentation site).
Fix a stable release#
A fix for the newest stable line usually waits for the next stable release: merge it into main, then promote the next nightly. When it cannot wait, or when it fixes an older line people still run:
-
Merge the fix into
mainfirst, as usual. -
Create the release branch from the stable tag, if it does not exist yet, and cherry-pick the fix onto a branch cut from it.
-xrecords where the commit came from, whichcichecks:git fetch --tags origin git push origin v0.3.0^{commit}:refs/heads/release-sculk-0.3 git switch -c fix-restart-timeout-0.3 origin/release-sculk-0.3 git cherry-pick -x <commit in main> -
Open a PR into
release-sculk-0.3. Thebranch-flowjob ofcifails if a commit in it, other than a merge commit, is not a cherry-pick of a commit inmain. It reads the-xtrailer, so it catches a fix that never went intomain; the maintainer who publishes still reviews what the PR changes. Merge it once every check passes. -
Run release on
release-sculk-0.3withchannelstableandproductsculk. It publishesv0.3.1from the head of the branch. It moves:0.3,:0from 1.0.0 on if that major has nothing newer, and:latestonly if 0.3 is still the newest line.
Delete a release branch once nobody runs that line.
Feature stages#
A stable release is a copy of a nightly, so everything merged into main reaches stable. A feature flag is how unfinished work rides along without showing up there. Use one for a user-visible feature that will not be finished before the next stable release. Never gate a bug fix or a small change.
Flags live in one map in apps/server/src/config/features.ts. Each entry names its stage (nightly or labs), where its Labs toggle will live (user or server), and a short description:
export const FEATURES = {
myFeature: {
stage: 'nightly',
scope: 'server',
about: 'Short description of what the feature adds.',
},
} as const satisfies Record<string, FeatureDef>;Every feature follows the same path, one small PR per step:
nightlywhile it is unfinished: on in dev and nightly builds, off in stable.labswhen it is finished: still on in nightly builds, off by default in stable, where the Labs page will let people switch it on.- Removed from
FEATURESonce it is trusted, together with every check for it. The next stable release ships it to everyone.
Check the flag in the route or service as well as in the UI, so a hidden feature cannot be called directly:
import { isEnabled } from '../config/features';
if (!isEnabled('myFeature')) return c.json({ error: 'not_found' }, 404, { 'Cache-Control': 'no-store' });import { useFeature } from '../shell/useBuild';
const enabled = useFeature('myFeature');While a feature is behind a flag, it must not change what already works when the flag is off. Its migrations still run on stable, so they may only add tables or columns, never change or drop existing ones.
GET /api/build reports the version, the channel (dev, nightly or stable, derived from the version) and the enabled flags, and the footer shows the channel (Dev, Nightly, or Beta for 0.x stable builds; hidden from 1.0.0 on). An operator forces a flag with SCULK_FEATURES, a comma-separated list (name on, -name off). Boot refuses a name that is not in FEATURES. Currently FEATURES holds oidcProvider (nightly, OIDC provider) and sculkworm (nightly, sculkworm integration).
Labs#
The Labs pages do not exist yet. They come with the first labs feature, as two pages: one in the account settings for user features, and one in each server's settings for server features, which the server owner sets for every player. An instance operator's SCULK_FEATURES wins over both, and the page shows the switch locked.
Switch channels on an instance#
Set SCULK_IMAGE in .env to the channel or version, then pull and restart:
| You want | SCULK_IMAGE |
|---|---|
| Every stable release | ghcr.io/yellowumbrelladev/sculk.network:latest |
| Fixes for one line only | ghcr.io/yellowumbrelladev/sculk.network:0.3 |
| One exact version | ghcr.io/yellowumbrelladev/sculk.network:0.3.1 |
| Every nightly | ghcr.io/yellowumbrelladev/sculk.network:nightly |
Moving from stable to nightly works at any time. Moving back does not: a nightly may have applied migrations that the stable release does not know, and the server refuses to start on a database newer than itself:
Error: migrations: the database has S40-labs.sql, which this version does not know. A newer version migrated it. Run that version or a later one, or restore a backup taken before the upgrade.Wait for the stable release that contains that nightly, or restore the backup you took before the switch.
One-time setup#
These need a repository admin. Do them once.
- Before the first release, Settings → Environments: create
nightlyandrelease. They need no protection rules: the workflow checks the role of whoever starts a stable release. - Once the repository is public, or on a paid plan: protect
mainandrelease-*(require a PR andci-ok), and on thereleaseenvironment add the maintainers as Required reviewers and limit Deployment branches tomainandrelease-*. Also restrict Deployment branches on thedocsenvironment tomainonce the plan allows. Until then the role check stops mistakes, not someone with write access: they can push a branch whose workflow skips the check, as they can with any workflow in the repository. - After the first run, open each package on GitHub (Packages →
sculk.network,oauthmc,sculkworm) and set its visibility, and under Manage Actions access give this repository the Write role.