Files
call-recorder/RELEASING.md
T
2026-11-06 11:37:57 +01:00

7.7 KiB

Releasing Gesprächsrekorder

A release consists of:

  • the Windows NSIS installer (per-user, no admin rights), cross-built on Debian,
  • the Debian .deb and .AppImage,
  • an updater signature (.sig) for each of them,
  • latest.json, the update feed the installed Windows apps read.

scripts/build-release.sh builds all of this locally into dist-release/<version>/ (gitignored). It never tags, pushes or publishes anything: tagging and creating the Gitea release are manual steps (below).

Installed Windows apps check the feed at startup and every 6 hours. If a newer version exists, the main window shows "Update verfügbar (vX.Y.Z) → Installieren & neu starten". Installing is only possible while no recording runs and no call is being processed. The installer then runs in passive mode (progress bar only) and restarts the app. Debian builds do not update themselves.

One-time setup

  1. Generate the updater key pair (once, never again):

    cargo tauri signer generate -w ~/.tauri/call-recorder.key
    

    Pick a password. Keep ~/.tauri/call-recorder.key and its password safe (e.g. in the password manager) and never commit it (the repository is public). If the key is lost, the installed apps cannot be updated anymore: every user would have to install a new version by hand.

  2. Public key: it is already in src-tauri/tauri.conf.json under plugins.updater.pubkey (key id 203A35A215098DED). Change it only if you rotate the key.

  3. Tools on the Debian build machine: the rustup toolchain with the x86_64-pc-windows-msvc target, cargo-xwin, makensis (NSIS), tauri-cli 2 (cargo tauri), pnpm, jq.

Where releases live: scripts/release.env

scripts/release.env is the single source of truth for the release URLs:

  • RELEASE_BASE_URL: the Gitea repository, https://gitea.euvino.eu/public/call-recorder. The download URLs in latest.json point to ${RELEASE_BASE_URL}/releases/download/v<version>/<file>.
  • UPDATE_JSON_URL: where the app looks for latest.json. build-release.sh writes it into plugins.updater.endpoints in src-tauri/tauri.conf.json.

Do not edit the endpoint in tauri.conf.json by hand. Change release.env; the next release build writes the endpoint into tauri.conf.json.

The repository and its releases must be readable without logging in: the app downloads anonymously.

Hosting the feed: two options

The endpoint is compiled into the app. Changing it only affects versions built after the change; installed versions keep asking the old URL. So check the URL right after the first release, before anyone relies on updates.

A: latest.json as a release asset (default)

UPDATE_JSON_URL="${RELEASE_BASE_URL}/releases/latest/download/latest.json"
→ https://gitea.euvino.eu/public/call-recorder/releases/latest/download/latest.json

Gitea has to redirect releases/latest/download/<file> to the newest release (not a draft, not a pre-release). That cannot be checked before the first release exists. Check it right after publishing the first release:

curl -sIL https://gitea.euvino.eu/public/call-recorder/releases/latest/download/latest.json

The final status must be 200. If it is 404, switch to B and release again.

B: latest.json committed to master

UPDATE_JSON_URL="${RELEASE_BASE_URL}/raw/branch/master/latest.json"
→ https://gitea.euvino.eu/public/call-recorder/raw/branch/master/latest.json

Comment out the A line in release.env and uncomment the B line. As the last step of every release, commit latest.json to the repository root (step 8 below).

Releasing a version

Example: version 0.1.1. Versions are semantic versions and must be higher than the installed one.

  1. Start from a clean master with the tests passing (cargo test --workspace).

  2. Build (works in fish and bash; without TAURI_SIGNING_PRIVATE_KEY_PASSWORD the script asks for the password):

    env TAURI_SIGNING_PRIVATE_KEY_PATH=$HOME/.tauri/call-recorder.key scripts/build-release.sh 0.1.1
    

    The script:

    • checks the key and password by signing a probe file, and stops if the key does not belong to plugins.updater.pubkey,
    • sets the version in src-tauri/tauri.conf.json, src-tauri/Cargo.toml and ui/package.json (the build updates Cargo.lock too), and writes the endpoint from release.env into tauri.conf.json,
    • builds the Windows installer (scripts/build-windows.sh), the .deb and the .AppImage, each with its .sig,
    • copies them to dist-release/0.1.1/ under ASCII names (Gespraechsrekorder_…) and writes latest.json with scripts/make-latest-json.sh.

    TAURI_SIGNING_PRIVATE_KEY (the key itself or a path) works instead of TAURI_SIGNING_PRIVATE_KEY_PATH.

  3. Check dist-release/0.1.1/. It should contain:

    File Purpose
    Gespraechsrekorder_0.1.1_x64-setup.exe (+ .sig) Windows installer and update package
    Gespraechsrekorder_0.1.1_amd64.deb (+ .sig) Debian package
    Gespraechsrekorder_0.1.1_amd64.AppImage (+ .sig) Debian AppImage
    latest.json Update feed
  4. Commit the version bump the script left in the working tree:

    git add src-tauri/tauri.conf.json src-tauri/Cargo.toml Cargo.lock ui/package.json
    git commit -m "chore #<wp>: release 0.1.1"
    
  5. Tag and push:

    git tag v0.1.1
    git push origin master v0.1.1
    
  6. Create the release v0.1.1 for the tag on https://gitea.euvino.eu/public/call-recorder/releases/new. Do not mark it as a draft or a pre-release, otherwise it is not the "latest" release.

  7. Upload every file from dist-release/0.1.1/ as a release asset, including the .sig files and latest.json. Keep the file names: latest.json points to them.

  8. Option B only: once the assets are uploaded, publish the feed:

    cp dist-release/0.1.1/latest.json latest.json
    git add latest.json
    git commit -m "chore #<wp>: update feed 0.1.1"
    git push origin master
    
  9. Check the feed:

    curl -sL https://gitea.euvino.eu/public/call-recorder/releases/latest/download/latest.json | jq .
    

    (Option B: the raw/branch/master/latest.json URL.) It must show the new version, and the url entries must download.

Checking an update on Windows 11

After publishing 0.1.0 and then 0.1.1:

  1. Install 0.1.0 as a normal user and start it.
  2. Within a few seconds the main window shows "Update verfügbar (v0.1.1) → Installieren & neu starten".
  3. Start a manual recording: the button is disabled and the banner says "Nach der laufenden Aufnahme/Verarbeitung möglich". Stop the recording and discard it: the button is enabled again.
  4. Click it: the banner shows the download progress. Then the installer shows only a progress bar, asks for no admin rights, and the app restarts as 0.1.1. The banner is gone.

Failed checks (offline, no release yet) are not shown. The log (%LOCALAPPDATA%\eu.euvino.callrecorder\logs) has an Info line update check failed: ….

Notes

  • scripts/build-windows.sh alone builds an unsigned test installer without updater artifacts when no signing key is set.
  • RELEASE_ALLOW_KEY_MISMATCH=1 lets build-release.sh build with a key that does not match plugins.updater.pubkey. Use it only to test the pipeline with a throwaway key. Installed apps reject such a release, so never publish it.
  • latest.json also lists the AppImage (linux-x86_64). The Debian builds do not check for updates yet.