latest.json and download the setup file it points to. There’s no update server to run: any place that serves files over https works. This page covers GitHub releases, your own hosting, and a few special setups.
GitHub releases
For a public repository:bach.toml
So each release needs the tag
v<version>, the setup file and latest.json. The release workflow or the Bach GitHub Action publishes exactly that.
Two details:
- GitHub renames uploaded files with spaces or unusual characters. With
githubset, Bach already names the file the way GitHub will serve it, soHello NotesbecomesHello-Notes-Setup-1.1.0.exe. - A pre-release isn’t GitHub’s “latest”, so installed apps don’t update to it. The same is true for a release you publish with “latest” turned off.
Your own web host
Cloudflare R2, S3, Netlify, a plain web server: anything that serves two files at fixed addresses.bach.toml
bach build, upload the setup file and latest.json from dist/. {version} can also be used in download_url, for example to keep each version in its own folder.
Writing the feed yourself
bach build writes the feed when it knows the download address. To write it again, for example after signing:
bach.toml, or pass --url. --notes-file reads release notes from a file. See bach feed.
Mirrors
A mirror is a second copy of the feed on another host, used when the first one can’t be reached:bach.toml
Private updates
If only paying or approved users may download updates, use an access key. The installed app sends the key it was installed with asAuthorization: Bearer <key>, and your server decides:
bach.toml
feed. Put your downloads on that same host. A redirect to another host, such as a storage bucket’s signed link, is followed without the key.
ARM64 and macOS in the same feed
If yourbach.toml has [arch.arm64], bach build writes an x64 and an ARM64 setup file, and one feed listing both. Each computer takes the file for its processor. If the ARM64 entry is missing or invalid, ARM64 computers take the x64 file, which also runs there.
With a [macos] section, the same feed also lists the Mac file. A Mac only takes the macOS entry, and Windows computers ignore it. Build both in one run so the feed has both, or add one later with bach feed ... --macos <file>.
Upload every file the feed lists.