ci: auto-cut releases on merge to main (Tauri)#32
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-actiondry-run) and callsrelease.ymlin the same run. No tag/commit pushed back to main → no secret, no release loop.build/ci/clamp_version.sh— keeps the project in0.xuntil 1.0.0 is shipped deliberately (feat!:bumps minor, not major). 8 unit tests.release.yml(reusable) — acreate-releasejob pre-creates the draft once and resolves the version across all triggers; the macOS/Windowsbuildjobs write the version intosrc-tauri/tauri.conf.json(not committed) and upload to the draft byreleaseId(avoids the tauri-action create-by-tag race, #914); apublishjob 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
feat:0.1.0→0.2.0)fix:feat!:/ breaking1.0.0)docs:/chore:onlyValidation
actionlintclean onversion.yml/pr-title.yml;release.ymlonly carries the pre-existing Apple-signing SC2086 inherited verbatim from mainzizmor: new workflows clean except the intentionalsecrets: inheritonversion.yml;release.ymlhas 1unpinned-use(rust-toolchain@stable, main's moving ref) — fewer than main (both checkouts now SHA-pinned)clamp_version_test.sh8/8;shellcheck/shfmtcleanversion.ymltriggers on push to main andrelease.yml'sworkflow_callonly fires from it, so the release path is first tested on the initial post-mergefeat:/fix:mergeNotes / known tradeoffs
tauri.conf.json(andCargo.toml) version stays0.1.0; git tags are the source of truth and the bundle version is injected at build time. If the app surfacesCARGO_PKG_VERSIONat runtime, that would need a committed bump (separate decision).rust-toolchain@stableunpinned) left as-is — out of scope.Replaces #9.
https://claude.ai/code/session_01JzTDM3mjWKS2XWbTFixBnk