Versioning and Releases

How Chatons determines version numbers and builds release artifacts.


Version Bump Script

scripts/version.js examines Git commit messages since the latest semver tag and determines the bump type.

How It Works

  1. Find the latest Git tag matching v?X.Y.Z (sorted by version:refname)
  2. If no tag exists, start from 0.0.0
  3. Read all commit subjects since that tag (git log TAG..HEAD --oneline --no-merges)
  4. Parse each subject for conventional commit type
  5. Determine bump: major, minor, patch, or none
  6. Update package.json > version
  7. Print the new version to stdout

Commit Parsing Rules

The script recognizes these commit types:

TypeExample
featfeat: add model picker to extensions
fixfix: prevent crash on empty model list
docsdocs: update user guide
stylestyle: format composer component
refactorrefactor: simplify auth flow
perfperf: cache model list
testtest: add settings validation tests
chorechore: update dependencies

Bump Precedence

PriorityConditionBump
1Subject contains BREAKING CHANGE or ends with !major
2At least one feat: commitminor
3At least one fix: commitpatch
4No qualifying commit typenone

What It Is Not

  • Not a complete Conventional Commits parser (does not parse multi-line footers)
  • Not a full semantic-release implementation
  • BREAKING CHANGE detection checks the subject line only, not the commit body

CI Workflow

.github/workflows/build-all-platforms.yml handles the release pipeline.

Jobs

  1. Determine and Set Version

    • Checks out with full history
    • Runs node scripts/version.js
    • Commits updated package.json if version changed ([skip ci])
    • Outputs version for downstream jobs
  2. Build macOS ARM64 (and other platform jobs)

    • Syncs package.json to the computed version
    • Determines signing mode based on available secrets
    • Builds renderer and Electron main process
    • Runs Electron Builder
    • Validates and signs artifacts (see Signing Guide)

Ignored Paths

Push and pull-request triggers ignore:

  • docs/**
  • README.md
  • **/*.md

Documentation-only changes do not trigger release builds.


Artifact Naming

Current Electron Builder configuration:

PlatformPatternExample
macOS DMG${productName}-latest-${arch}.${ext}Chatons-latest-arm64.dmg
Windows NSIS${productName}Setup-latest.${ext}ChatonsSetup-latest.exe
Linux${productName}-latest.${ext}Chatons-latest.AppImage

Artifact filenames use latest and architecture, not the semver number. Do not assume semver appears in filenames.


Local Usage

# Print the computed version (or apply the bump)
node scripts/version.js

# Run version tests
npm run version:test

Test files:

  • scripts/test-version.js
  • scripts/test-version-logic.js

Manual Override

No dedicated release CLI for manual overrides. The fallback is editing package.json > version directly and committing.


On this page