Skip to content

Repository files navigation

Tauri + React + Typescript

This template should help get you started developing with Tauri, React and Typescript in Vite.

Recommended IDE Setup

CI & Versioning

For reasoning about this decision, refer to the ADR (Architecture Decision Record) doc.

This repository uses GitVersion (v6) to derive a SemVer version automatically from the git graph — no manual version bumps needed in most cases.

Branch model

Branch pattern Example Version produced Pre-release tag
dev / main / master dev X.(Y+1).0-alpha.N alpha
release/version-demo_vX.Y release/version-demo_v3.1 X.Y.0-beta.N beta
Tagged commit release/version-demo_v3.1.0 3.1.0 (stable)
  • dev branch uses ContinuousDeployment mode. Every commit produces X.(Y+1).0-alpha.N where N is the commit count since the last release tag. Minor version increments automatically.
  • release/version-demo_vX.Y branches use ContinuousDelivery mode. The X.Y in the branch name drives the base version — no anchor tag required. Every commit produces X.Y.0-beta.N where N is the commit count on that branch.
  • Tagging a release commit as release/version-demo_vX.Y.Z (or release/version-demo_vX.Y.Z-beta.N) produces exactly X.Y.Z (or X.Y.Z-beta.N) with no increment.

Bumping the major version

Include +semver: breaking or +semver: major in dev in a commit message to trigger a major version bump.

Tag prefix

Tags must be prefixed with release/version-demo_v (e.g. release/version-demo_v3.1.0).

CI workflow

  • The workflow triggers on pushes to dev, release/* branches, and release/* tags.
  • GitVersion computes the VERSION and injects it before the build.
  • Each CI run embeds a monotonic build id ${{ github.run_id }}-${{ github.run_attempt }} into both the frontend bundle and the Rust binary.

Automatic releases

When you push a tag matching release/version-demo_vX.Y.Z, the CI workflow automatically:

  1. Builds the frontend and Rust backend
  2. Creates a GitHub Release with:
    • Release name and tag from the tag name (e.g., release/version-demo_v1.2.3)
    • Zipped frontend dist artifact
    • Auto-generated release notes from merged PRs and commits since the last tag

What the app shows

  • Frontend: src/build-info.json (generated at build time) contains version, buildId, and commitSha.
  • Backend: the get_build_info Tauri command returns the same metadata at runtime.

Local testing:

  1. Install dependencies and build the frontend:
npm install -g pnpm
pnpm install
pnpm build
  1. Build the Rust backend (Tauri):
cd src-tauri
cargo build --release

In CI, the src/build-info.json file is created by the workflow before the frontend build so the version is baked into the produced bundle.

Cherry-pick bot

A GitHub Action automatically creates cherry-pick pull requests when you comment /cherry-pick-to <branch> on any merged pull request.

Usage:

/cherry-pick-to release/1.x

The bot will:

  1. Extract the squash-merge commit from the original PR
  2. Create a new branch off the target branch
  3. Cherry-pick the commit
  4. Open a PR titled [Cherry Pick] <original title> → <target-branch>
  5. Link back to the original PR in a comment

Prerequisites:

For the bot to work, GitHub Actions must have permission to create PRs. Enable this in your repository settings:

  1. Go to Settings → Actions → General
  2. Under Workflow permissions, select "Read and write permissions"
  3. Check "Allow GitHub Actions to create and approve pull requests"
  4. Click Save

image.png

Without this setting, the workflow will fail with HttpError: GitHub Actions is not permitted to create or approve pull requests.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages