Skip to content

ci: auto-cut releases on merge to main (Tauri)#32

Merged
statik merged 4 commits into
mainfrom
feat/auto-release-tauri
Jul 9, 2026
Merged

ci: auto-cut releases on merge to main (Tauri)#32
statik merged 4 commits into
mainfrom
feat/auto-release-tauri

Conversation

@statik

@statik statik commented Jun 21, 2026

Copy link
Copy Markdown
Member

Recreates #9 against the Tauri/Rust main (the Go implementation it was built on was removed during the v2 migration). Architecture is unchanged from the approved design; only the build hand-off was re-fit to the Tauri pipeline.

Summary

  • version.yml — on push to main, computes the next semver from Conventional Commits (mathieudutour/github-tag-action dry-run) and calls release.yml in the same run. No tag/commit pushed back to main → no secret, no release loop.
  • build/ci/clamp_version.sh — keeps the project in 0.x until 1.0.0 is shipped deliberately (feat!: bumps minor, not major). 8 unit tests.
  • release.yml (reusable) — a create-release job pre-creates the draft once and resolves the version across all triggers; the macOS/Windows build jobs write the version into src-tauri/tauri.conf.json (not committed) and upload to the draft by releaseId (avoids the tauri-action create-by-tag race, #914); a publish job flips the draft to published on the auto path. Manual dispatch / tag-push stay drafts.
  • pr-title.yml — lints PR titles as Conventional Commits (squash-merge makes the title the commit subject the versioner reads).

Versioning

Merge Result
feat: minor (0.1.00.2.0)
fix: patch
feat!: / breaking minor, clamped to 0.x (not 1.0.0)
docs:/chore: only no release

Validation

  • actionlint clean on version.yml/pr-title.yml; release.yml only carries the pre-existing Apple-signing SC2086 inherited verbatim from main
  • zizmor: new workflows clean except the intentional secrets: inherit on version.yml; release.yml has 1 unpinned-use (rust-toolchain@stable, main's moving ref) — fewer than main (both checkouts now SHA-pinned)
  • clamp_version_test.sh 8/8; shellcheck/shfmt clean
  • Cannot be exercised on this PRversion.yml triggers on push to main and release.yml's workflow_call only fires from it, so the release path is first tested on the initial post-merge feat:/fix: merge

Notes / known tradeoffs

  • Per the no-secret approach, the in-repo tauri.conf.json (and Cargo.toml) version stays 0.1.0; git tags are the source of truth and the bundle version is injected at build time. If the app surfaces CARGO_PKG_VERSION at runtime, that would need a committed bump (separate decision).
  • Pre-existing lint debt in main's release build (Apple-signing SC2086, rust-toolchain@stable unpinned) left as-is — out of scope.

Replaces #9.

https://claude.ai/code/session_01JzTDM3mjWKS2XWbTFixBnk

statik added 4 commits June 21, 2026 19:46
Ports the language-agnostic pieces of the auto-release feature onto the
Tauri main: 0.x semver clamp (+tests), version.yml (conventional-commit
versioner that calls the reusable release workflow), and conventional PR
title linting.
Adds a workflow_call interface to release.yml. When called with a computed
version it writes that into src-tauri/tauri.conf.json at build time (jq, not
committed) so tauri-action tags and builds it, then a publish job flips the
draft to published. Manual dispatch / tag-push are unchanged and stay drafts.
Parallel matrix jobs creating a release by tag can race and produce
duplicate/partial releases (tauri-action#914) — unsafe on the auto-publish
path. A create-release job now makes the draft once and resolves the version
across all triggers; the macOS/Windows builds upload to it by releaseId; a
publish job flips the draft via the GitHub API. Checkouts SHA-pinned.
@statik statik mentioned this pull request Jun 21, 2026
7 tasks
@statik
statik merged commit d004fc3 into main Jul 9, 2026
7 checks passed
@statik
statik deleted the feat/auto-release-tauri branch July 9, 2026 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant