N Nightship
Guides / Publishing builds
// publishing builds

Push a build from the command line

Publish a build to a channel from your machine or a script. The command differs slightly by engine — Cargo uploads whole files to the server, Tide uploads only changed chunks to your bucket.

Point the CLI at your server

nightship config set server https://builds.example.com
nightship config set token <your-token>

Cargo channels

A channel must exist before anything can be promoted to it. Create one (Cargo is the default engine) and push a folder — it becomes the channel’s current build:

nightship channel create latest
nightship push ./package --channel latest --server https://builds.example.com

Move the pointer to a specific build with nightship promote <channel> <build-id> (or --from <channel>). Roll back by promoting an older id.

Tide channels

Set the bucket write credentials (see Connect object storage), then push with the Tide CLI. Only changed chunks upload:

export TIDE_S3_ENDPOINT=... TIDE_S3_REGION=... TIDE_S3_BUCKET=...
export TIDE_S3_KEY=... TIDE_S3_SECRET=...

nightship-tide push ./package demo --force \
  --register https://builds.example.com --register-token <publisher-token>

--register creates and registers the channel on nightshipd as a Tide channel the first time (it’s idempotent — a second push just updates it). Add --sign <key> to Ed25519-sign the manifest. Pushes are content-addressed: re-pushing an unchanged build reports unchanged and publishes nothing, so subscribers see no phantom update — safe to run on every CI build.

Check it landed

Pull it back into a fresh directory and verify against the manifest:

nightship-tide sync demo ./out
nightship-tide verify demo ./out

Not sure which engine a channel should be? See Storage engines: Cargo vs Tide. To do this on every green build, see Publish from CI.

← All guides