Skip to content

Release a new version ​

Releases follow a simple pattern: a "Bump version" commit, a vX.Y.Z tag, and installers uploaded to Cloudflare R2 when the tag is pushed. The app repository is private, so people download from the Download page of the Altar Studio website, which reads R2, not from GitHub releases.

1. Merge the work ​

dev is the integration branch; there is no main. Features land on feat/<topic> and fixes on fix/<topic>, merged into dev by pull request. The 0.3.0 betas (vX.Y.Z-beta.N) are released from the beta branch.

2. Bump the version everywhere ​

Altar Studio's version string lives in seven places. Change all of them in one commit:

FileWhat to change
package.json"version"
package-lock.jsonBoth "version" fields for the root package (run npm install to update them)
src-tauri/Cargo.tomlversion under [package]
src-tauri/Cargo.lockThe altar-studio entry (cargo check in src-tauri updates it)
src-tauri/tauri.conf.json"version", which the app shows at runtime. The release script checks the tag against it.
src/control/settings/SettingsPage.tsxThe fallback version on the About page
src/lib/mock-backend.tsThe version in the mock workspace_info

To find any you've missed, search for the old version:

powershell
git grep -n "0.2.3" -- ':!*.lock' ':!package-lock.json'

Commit with the subject Bump version to X.Y.Z.

Altar Studio Autopilot's version ​

Autopilot ships in the same release, built from the same tagged commit, but it has its own version (0.1.0-beta.N while in beta). The two apps check that they can work together by the Link's PROTOCOL number, not by versions, so bump Autopilot's version only when Autopilot itself changed. It lives in four places:

FileWhat to change
autopilot/package.json"version"
autopilot/src-tauri/Cargo.tomlversion under [package]
autopilot/src-tauri/tauri.conf.json"version", which names Autopilot's installers
autopilot/src-tauri/Cargo.lockThe altar-autopilot entry

3. Test ​

powershell
npm test
npm run build
cd src-tauri; cargo test

Then run the desktop app and go through a short service with an output open. See Run the tests for the crates' and Autopilot's tests.

4. Tag and push ​

powershell
git tag vX.Y.Z
git push origin dev --tags

An annotated tag (git tag -a vX.Y.Z -m "…") gives the release its own "What's new" text. Without one, the notes list the pull requests merged since the previous tag.

Pushing the tag builds and uploads this computer's installers (next section), and the push waits until that's done. If it fails, the push stops and the tag isn't on GitHub yet: fix the problem and push again.

5. Build and upload ​

The repository has a Husky pre-push hook (.husky/pre-push, installed by npm install) that runs scripts/release-upload.mjs. Ordinary pushes go straight through. When a push includes a v* tag, the script:

  1. checks that the tag's version matches src-tauri/tauri.conf.json at the tagged commit,
  2. builds from a clean worktree at that commit (never from your checkout), with npm ci, then Altar Studio's installers for this computer, then Autopilot's when the commit has the autopilot/ app,
  3. uploads them to R2 under releases/<tag>/build/<macOS|Windows|Linux>/, with spaces in file names replaced by dots (Altar.Studio_<version>_x64-setup.exe, Altar.Studio.Autopilot_<version>_…),
  4. writes releases/<tag>/release.txt, in the bucket and in the local releases/ folder: the tag, the commit, what's new and a download link per platform, with Autopilot's in their own section. It lists every platform already in the bucket, so a second computer adding its installers rewrites it with all of them,
  5. for stable tags only, updates releases/latest.json, which the website's download page reads: this platform's version, tag, commit, notes link and files, with Autopilot's under autopilot. Each computer replaces only its own platform's entry, and an older tag never replaces a newer one. Pre-release tags (with a hyphen, such as v0.3.0-beta.2) leave it alone.

release.txt and latest.json are written with Cache-Control: no-cache, so the website and browsers always fetch the current copy.

ComputerBuilds
macOSThe aarch64 and x64 DMGs of each app
WindowsThe .exe and .msi of each app. A pre-release version builds only the .exe, because MSI versions allow only numbers after the hyphen.
LinuxSee Linux packages

A release needs a Mac and a Windows computer, plus the Linux packages. Push the tag from one computer. The tag is then already on GitHub, so on the other computer run the script by hand with the tag.

R2 settings ​

The script reads these from .env in the repository root (ignored by git):

VariableValue
R2_ACCOUNT_IDThe Cloudflare account ID, or the bucket's S3 API URL from the dashboard
R2_ACCESS_KEY_IDThe R2 API token's Access Key ID (32 hex characters, not the token value)
R2_SECRET_ACCESS_KEYThe token's secret access key
R2_BUCKETThe bucket name
R2_PUBLIC_URLThe bucket's public URL, used for the download links

Without them, the hook warns and the push goes on without uploading.

Options ​

SettingEffect
SKIP_RELEASE_UPLOAD=1Push the tag without building or uploading
RELEASE_SKIP_BUILD=1Upload installers already built in src-tauri/target/ instead of building
RELEASE_SKIP_AUTOPILOT=1Release Altar Studio alone. Tags from before Autopilot existed do so by themselves.

Run it by hand ​

To build and upload without pushing:

bash
npm run release:upload -- vX.Y.Z [--dry-run] [--skip-build]

--dry-run builds (unless --skip-build) and writes the local release.txt, but uploads nothing. --skip-build is the same as RELEASE_SKIP_BUILD=1.

On Windows, npm run may refuse with EALLOWSCRIPTS. Run the script with Node directly instead:

powershell
node scripts/release-upload.mjs vX.Y.Z

Linux packages ​

The Linux packages are built in Docker, on a Mac with Docker Desktop running:

bash
npm run release:linux -- vX.Y.Z

scripts/linux/release-linux.sh builds both apps' .deb, .rpm and AppImage from a git archive of the tag (uncommitted changes are never included) in an Ubuntu 22.04 x86-64 container, and puts them in releases/vX.Y.Z/build/Linux/. It then smoke-tests each app on clean containers: the .deb on Ubuntu 22.04, the AppImage on Ubuntu 24.04 and the .rpm on Fedora 41, with logs and screenshots in releases/vX.Y.Z/linux-smoke/. --no-smoke skips the tests, and SKIP_AUTOPILOT=1 builds Altar Studio only.

The build image (altar-linux-build:amd64) and two volumes (the Rust target folder and Tauri's bundling tools) are kept between runs, so later builds take a few minutes. The first one takes much longer, especially on Apple Silicon, where the container is emulated.

Then upload them as the Linux platform:

bash
npm run release:upload -- vX.Y.Z --linux

6. Update the docs ​

Change the version in the docs site's nav (docs/.vitepress/config.mts) and docs/package.json, and add notes for any changed behaviour.

Altar Studio by Milton Black. Free and open source.