ci(desktop): release from git tag instead of source-tree bump - #144
ci(desktop): release from git tag instead of source-tree bump#144chareice wants to merge 1 commit into
Conversation
Parse the version from the pushed tag name in CI, patch tauri.conf.json on the runner, and let the build proceed. Removes the need for a bump commit + PR per release. The matrix builds upload to a draft release (so end-users never see a partial release while platforms are still uploading). A follow-up publish job flips the draft to published once all three platforms succeed. If any matrix platform fails, the release stays as a draft. Set tauri.conf.json version to 0.0.0 as a placeholder — overridden at build time. Documented the new flow in docs/deployment/runbook.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the desktop release pipeline to derive the app version from pushed git tags and publish the GitHub release only after all platform builds succeed, removing the need for source-tree version bump commits.
Changes:
- Set
tauri.conf.jsonto a placeholder version (0.0.0) and inject the real version during CI fromdesktop-v*tags. - Update the desktop GitHub Actions workflow to create a draft release during matrix builds and publish it in a follow-up job.
- Document the new desktop release flow in the deployment runbook.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
packages/desktop/src-tauri/tauri.conf.json |
Uses placeholder version intended to be overridden by CI. |
docs/deployment/runbook.md |
Adds runbook steps for releasing the desktop app via desktop-v<VERSION> tags. |
.github/workflows/desktop.yml |
Parses version from tag, patches tauri.conf.json on runners, builds in a matrix, then publishes the release after success. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Inject version from tag | ||
| shell: bash | ||
| run: | | ||
| REF="${GITHUB_REF_NAME}" | ||
| VERSION="${REF#desktop-v}" | ||
| if [ -z "$VERSION" ] || [ "$VERSION" = "$REF" ]; then | ||
| echo "::error::Expected tag like desktop-vX.Y.Z, got '$REF'" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Because this workflow is also enabled for workflow_dispatch, GITHUB_REF_NAME will typically be a branch name (e.g. main) and this step will always fail the run. Either remove workflow_dispatch if it's not intended, or add a dispatch input for the version (and/or gate this step to only run on tag pushes).
| if [ -z "$VERSION" ] || [ "$VERSION" = "$REF" ]; then | ||
| echo "::error::Expected tag like desktop-vX.Y.Z, got '$REF'" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
The error message says it expects a tag like desktop-vX.Y.Z, but the current parsing only checks the prefix and will accept any suffix (including non-semver), which then gets written into tauri.conf.json and may fail later with a less clear error. Consider validating the extracted version against a semver-like pattern here (or loosen the message to match the actual validation).
| fi | |
| fi | |
| if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then | |
| echo "::error::Expected tag like desktop-vX.Y.Z, got '$REF'" | |
| exit 1 | |
| fi |
Summary
Removes the bump-commit-per-release ritual from desktop releases.
desktop-v0.3.0→0.3.0) and patchestauri.conf.jsonon each runner beforetauri-actionruns.publishjob flips it to published once all three platforms succeed. If any platform fails, the release stays a draft.tauri.conf.jsonversionset to0.0.0as a placeholder (overridden at build time). Localtauri devwill show 0.0.0 — intentional.How to release after this lands
That's it. No more bump PR.
🤖 Generated with Claude Code