Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Guard the release-desktop version input and document the Cargo version (#7889)
Daniel Han3746465ec7d6
diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.ymlindex 7e1adb08ff3..27b2090518d 100644--- a/.github/workflows/release-desktop.yml+++ b/.github/workflows/release-desktop.yml@@ -2,13 +2,28 @@ name: Release Desktop Appon:workflow_dispatch:+ # Both version inputs are free text in the dispatch UI, and studio_version+ # alone decides the release tag, all nine asset filenames and the updater+ # manifest version together. Near-miss tags are the failure mode worth+ # guarding, because they look right at a glance:+ #+ # studio_version v0.1.52-beta correct+ # v.0.1.52-beta rejected: stray dot after the leading v+ # 0.1.52-beta rejected: missing leading v+ # 2026.8.3 rejected: that is the PyPI version+ #+ # pypi_version 2026.8.3 correct, no leading v+ #+ # "Validate release versions" below rejects each of those by name before any+ # binary is built. Keep the examples here, in the descriptions, and in that+ # step's error messages on the same version so they cannot drift apart.inputs:studio_version:- description: 'Unsloth version tag to release (for example, v0.1.39-beta)'+ description: 'Unsloth SemVer tag to release, leading v with no dot after it (for example, v0.1.52-beta)'type: stringrequired: truepypi_version:- description: 'Exact PyPI unsloth version just published/stamped (for example, 2026.5.3); leave blank to use MIN_DESKTOP_BACKEND_VERSION'+ description: 'Exact PyPI unsloth version just published/stamped, no leading v (for example, 2026.8.3); leave blank to use MIN_DESKTOP_BACKEND_VERSION'type: stringrequired: falsedraft:@@ -68,16 +83,29 @@ jobs:studio_version = os.environ['INPUT_STUDIO_VERSION'].strip()if not studio_version:- sys.exit('studio_version is required, for example v0.1.39-beta')+ sys.exit('studio_version is required, for example v0.1.52-beta')if re.fullmatch(r'v?20\d{2}\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?', studio_version):sys.exit(f'studio_version must be an Unsloth SemVer tag, not a date-style backend version: {studio_version}')+ # Name the single wrong character for the near-miss shapes. The generic+ # SemVer error below is easy to skim past when everything except one+ # separator looks correct, so spell out the correction instead.+ separator_after_v = re.fullmatch(r'v[._\-](\d[0-9A-Za-z.\-+]*)', studio_version)+ if separator_after_v:+ suggestion = f'v{separator_after_v.group(1)}'+ sys.exit(+ 'studio_version must not have a separator after the leading v: '+ f'{studio_version} (did you mean {suggestion}?)'+ )+semver_tag = re.compile(r'^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)'r'(?:-[0-9A-Za-z.][0-9A-Za-z.-]*)?$')+ if semver_tag.fullmatch(f'v{studio_version}'):+ sys.exit(f'studio_version must start with v, for example v{studio_version}')if not semver_tag.fullmatch(studio_version):- sys.exit(f'studio_version must be a SemVer tag with leading v, for example v0.1.39-beta: {studio_version}')+ sys.exit(f'studio_version must be a SemVer tag with leading v, for example v0.1.52-beta: {studio_version}')app_version = studio_version.removeprefix('v')asset_version = re.sub(r'[^0-9A-Za-z]+', '_', app_version).strip('_')diff --git a/studio/src-tauri/Cargo.toml b/studio/src-tauri/Cargo.tomlindex d99295e1945..cbb8215f14c 100644--- a/studio/src-tauri/Cargo.toml+++ b/studio/src-tauri/Cargo.toml@@ -1,5 +1,11 @@[package]name = "unsloth-studio"+# Placeholder, not the released app version. release-desktop.yml rewrites this+# field (and the unsloth-studio entry in Cargo.lock) to the dispatched+# studio_version before every release build, so editing it here changes nothing+# that ships. tauri.conf.json declares no version of its own, which is why the+# app version comes from this field rather than from there. The stale CalVer+# below is also the wrong shape: release builds always write SemVer, e.g. 0.1.52-beta.version = "2026.4.8"description = "Unsloth Desktop App"authors = ["Unsloth AI"]