---
title: Releasing
description: How a version tag becomes installers, signed update files and a draft GitHub release.
sidebar:
  order: 7
---

A release starts with a tag that begins with `v`. Pushing one runs the Installers workflow, which builds every installer and opens a draft release. Nothing reaches users until someone publishes that draft by hand.

## What a tag does

1. **Build on every platform**

    `installers.yml` calls `build.yml` for the tag. It runs one job per platform, each on a runner of that kind, so nothing is cross-compiled: Windows x64, macOS Apple Silicon, macOS Intel, Linux x64 (Ubuntu 24.04) and Linux ARM. Each job runs `node scripts/build-installer.mjs`.

2. **Sign the update files**

    The workflow passes the `TAURI_SIGNING_PRIVATE_KEY` secret to the build. With it, the build also makes the signed files installed apps update themselves from. Without it there are no update files.

3. **Rename and checksum**

    A `release` job downloads the installers, flattens them into one folder, and runs `scripts/release-names.mjs` to give them names people can pick from. Then it writes `SHA256SUMS.txt`.

4. **Write latest.json**

    `scripts/update-manifest.mjs` writes `latest.json`, which carries each update's URL and signature. The `.sig` files are deleted afterwards, since `latest.json` has their contents.

5. **Scan and prepare winget**

    If the `VT_API_KEY` secret is set, each installer is uploaded to VirusTotal and linked from the release notes. The free API takes 4 requests a minute, so the job waits 40 seconds between files. `scripts/winget-manifests.mjs` writes the winget manifests and uploads them as a `winget-manifests` artifact.

6. **Open the draft**

    `gh release create` makes a draft titled `Hindsight <version>`, with every file attached and a notes file that starts as a table of "Which file do I need?" and the checksums. A comment at the top of it reminds you to write what's new.

## The files in a release

For version 0.1.1, `release-names.mjs` turns the bundler's names into these:

| File | For |
|---|---|
| `Hindsight-0.1.1-Windows-Setup.exe` | Windows (also the file winget installs) |
| `Hindsight-0.1.1-macOS-Apple-Silicon.dmg` | Macs with an M chip |
| `Hindsight-0.1.1-macOS-Intel.dmg` | Intel Macs |
| `Hindsight-0.1.1-Linux-x64.AppImage` | Linux |
| `Hindsight-0.1.1-Linux-ARM64.AppImage` | Linux on ARM |
| `Hindsight-0.1.1-macOS-Apple-Silicon-update.tar.gz` and `...-Intel-update.tar.gz` | The app updating itself on a Mac |
| `SHA256SUMS.txt` | Checksums of everything but the `.sig` files |
| `latest.json` | What every installed app reads to find a newer version |

A file the rename script has no name for stops the release, rather than going up under the bundler's name.

## Before you tag

The version number appears in several files, and they should agree:

- `version` in `[workspace.package]` in the root `Cargo.toml`. The daemon, server, core and desktop crates inherit it.
- `version` in `apps/desktop/src-tauri/tauri.conf.json`. This is the one the installer and the updater use, and the macOS update file is named from it.
- `version` in `apps/desktop/package.json`.

The VS Code extension has its own version in `adapters/vscode/package.json`, and the OpenCode plugin and Zed extension have theirs. The installer packages the VS Code extension from the same checkout.

Merge the version change to `main` through a pull request like any other change, then tag the merge commit:

```bash
git tag v0.1.2
git push origin v0.1.2
```

Release builds use the release profile in `Cargo.toml` as written (thin LTO, one codegen unit, size-optimized, `panic = "abort"`). Every other build skips LTO and uses 16 codegen units, trading a slightly larger app for a much shorter compile.

## Publishing the draft

Look over the draft before you publish it:

1. Write what's new at the top, replacing the comment.
2. Check the VirusTotal scans, if they ran.
3. Publish it.

Installed apps read `latest.json` from `https://github.com/MIXIDtheSilly/Hindsight/releases/latest/download/latest.json`, which is the newest published release. A draft reaches nobody, so apps update only once you publish. The updater checks signatures against the public key in `plugins.updater.pubkey` in `tauri.conf.json`, so the signing secret has to be the matching private key. On Windows the update installs quietly.

Then submit the winget manifests from the `winget-manifests` artifact to `microsoft/winget-pkgs`. The package id is `mixid_mbb.Hindsight`. The installer manifest points at the release's `Windows-Setup.exe` and its SHA-256, so the file has to be the one attached to the published release.

## Build one by hand

You don't need a tag to try the installer. Run the Build workflow from the Actions tab, or build on your own computer:

```bash
node scripts/build-installer.mjs
```

It needs Rust, Node 20 or newer and, on Linux, the same system libraries as [running locally](/docs/developers/run-locally). The script:

1. Builds the daemon in release mode with `cargo build -p hindsight-daemon --release --locked`, and copies it to `apps/desktop/src-tauri/binaries/hindsight-daemon-<target triple>`, where Tauri expects an external binary.
2. Installs and compiles the VS Code extension and packages it with `@vscode/vsce` as `hindsight-vscode.vsix`, which `hindsight-daemon connect` later installs into VS Code and Cursor.
3. Runs `tauri build` with `tauri.installer.conf.json`, which adds the daemon and the extension to the bundle.
4. Checks the built frontend. If the page and its scripts come from different builds, it stops, because that installer would open a blank window.

The default bundle per system is `nsis` on Windows, `app,dmg` on macOS and `appimage` on Linux. Extra arguments go to `tauri build`, so `--bundles msi` works.

The installer's daemon signs people in at the hosted server, `https://hindsight.mixidthesilly.dev`. That address is baked in at compile time through `HINDSIGHT_DEFAULT_SERVER_URL`. To build an installer for your own server:

```bash
node scripts/build-installer.mjs --server https://hindsight.example.com
```

On Windows, run it from a path that starts with an uppercase drive letter (`C:\`). A lowercase one makes Node load SvelteKit twice and the two builds overwrite each other.

### Where the files end up

| System | Path under `target/release/bundle/` |
|---|---|
| Windows | `nsis/Hindsight_<version>_x64-setup.exe` |
| macOS | `dmg/Hindsight_<version>_<arch>.dmg` |
| Linux | `appimage/Hindsight_<version>_<arch>.AppImage` |

With `TAURI_SIGNING_PRIVATE_KEY` set, the script also makes the `.sig` files next to them, and on macOS a `Hindsight_<version>_<arch>.app.tar.gz`.

## The server image

The server is released separately and continuously. Every push to `main` that changes the server, core, `website/`, `Cargo.toml`, `Cargo.lock` or the Dockerfile publishes `ghcr.io/mixidthesilly/hindsight-server` with `latest` and the commit hash as tags. No tag is needed. See [self-hosting](/docs/developers/self-hosting).
