Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

Handle prerelease tags in GitHub release publishing (#344)

Theo Browneb74c7a79abbf
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 2a9d274b7..d8d141082 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -22,6 +22,8 @@ jobs:
outputs:
version: ${{ steps.release_meta.outputs.version }}
tag: ${{ steps.release_meta.outputs.tag }}
+ is_prerelease: ${{ steps.release_meta.outputs.is_prerelease }}
+ make_latest: ${{ steps.release_meta.outputs.make_latest }}
ref: ${{ github.sha }}
steps:
- name: Checkout
@@ -45,6 +47,13 @@ jobs:
echo "version=$version" >> "$GITHUB_OUTPUT"
echo "tag=v$version" >> "$GITHUB_OUTPUT"
+ if [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+ echo "is_prerelease=false" >> "$GITHUB_OUTPUT"
+ echo "make_latest=true" >> "$GITHUB_OUTPUT"
+ else
+ echo "is_prerelease=true" >> "$GITHUB_OUTPUT"
+ echo "make_latest=false" >> "$GITHUB_OUTPUT"
+ fi
- name: Setup Bun
uses: oven-sh/setup-bun@v2
@@ -260,7 +269,8 @@ jobs:
target_commitish: ${{ needs.preflight.outputs.ref }}
name: T3 Code v${{ needs.preflight.outputs.version }}
generate_release_notes: true
- make_latest: true
+ prerelease: ${{ needs.preflight.outputs.is_prerelease }}
+ make_latest: ${{ needs.preflight.outputs.make_latest }}
files: |
release-assets/*.dmg
release-assets/*.zip
diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.ts
index 787ec3e04..945f1d279 100644
--- a/apps/desktop/src/main.ts
+++ b/apps/desktop/src/main.ts
@@ -58,6 +58,8 @@ const LOG_FILE_MAX_FILES = 10;
const APP_RUN_ID = Crypto.randomBytes(6).toString("hex");
const AUTO_UPDATE_STARTUP_DELAY_MS = 15_000;
const AUTO_UPDATE_POLL_INTERVAL_MS = 4 * 60 * 60 * 1000;
+const DESKTOP_UPDATE_CHANNEL = "latest";
+const DESKTOP_UPDATE_ALLOW_PRERELEASE = false;
type DesktopUpdateErrorContext = DesktopUpdateState["errorContext"];
@@ -725,7 +727,10 @@ function configureAutoUpdater(): void {
autoUpdater.autoDownload = false;
autoUpdater.autoInstallOnAppQuit = false;
- autoUpdater.allowPrerelease = app.getVersion().includes("-");
+ // Keep alpha branding, but force all installs onto the stable update track.
+ autoUpdater.channel = DESKTOP_UPDATE_CHANNEL;
+ autoUpdater.allowPrerelease = DESKTOP_UPDATE_ALLOW_PRERELEASE;
+ autoUpdater.allowDowngrade = false;
let lastLoggedDownloadMilestone = -1;
autoUpdater.on("checking-for-update", () => {
diff --git a/docs/release.md b/docs/release.md
index 68a77f4d9..6c338ee64 100644
--- a/docs/release.md
+++ b/docs/release.md
@@ -12,6 +12,8 @@ This document covers how to run desktop releases from one tag, first without sig
- Linux `x64` AppImage
- Windows `x64` NSIS installer
- Publishes one GitHub Release with all produced files.
+ - Versions with a suffix after `X.Y.Z` (for example `1.2.3-alpha.1`) are published as GitHub prereleases.
+ - Only plain `X.Y.Z` releases are marked as the repository's latest release.
- Includes Electron auto-update metadata (for example `latest*.yml` and `*.blockmap`) in release assets.
- Publishes the CLI package (`apps/server`, npm package `t3`) with OIDC trusted publishing.
- Signing is optional and auto-detected per platform from secrets.