Skip to main content
Versioning is fully automated using semantic-release. When preview merges into main, semantic-release analyzes commit messages, determines the version bump, updates CHANGELOG.md, creates a git tag, and publishes a GitHub Release — all without any manual steps.

How it works

Version bump rules

The version bump is determined by the highest-impact commit in the batch merged to main: If no release-triggering commits are present, semantic-release exits without creating a release.

What happens on merge to main

1

Commit analysis

@semantic-release/commit-analyzer reads all commits since the last tag using the conventionalcommits preset. It determines whether a release is needed and what the version bump is.
2

Release notes generated

@semantic-release/release-notes-generator builds the changelog body. Commits are grouped by type: Features, Bug Fixes, Performance, Documentation, CI/CD, Tests, Refactoring, Miscellaneous.
3

CHANGELOG.md updated

@semantic-release/changelog prepends the new release notes to CHANGELOG.md. Do not edit this file manually — it is always overwritten.
4

package.json version bumped

@semantic-release/npm updates the version field in the root package.json. npmPublish: false ensures the package is not published to the npm registry.
5

Changelog committed

@semantic-release/git commits CHANGELOG.md and package.json back to main with the message:
The [skip ci] tag prevents an infinite loop of release workflows.
6

GitHub Release created

@semantic-release/github creates a GitHub Release with the version tag (e.g., v1.2.3) and the generated release notes as the body.
7

preview branch synced

The sync-preview.yml workflow runs after the release workflow completes. It merges main into preview so the next feature branch is based on the released code.
8

Discord notification

A Discord embed confirms the sync:
Preview branch syncedpreview is now in sync with main at abc1234. Safe to pull and branch from preview.

.releaserc.json

The full configuration:
Key decisions:
  • branches: ["main"] — only releases from main, never from preview or feature branches
  • npmPublish: false — version bump only, no npm registry publish
  • assets: ["CHANGELOG.md", "package.json"] — only these two files are committed back by the release
  • All 8 commit types appear in release notes (even chore and test) for full traceability, but only feat, fix, and perf trigger a version bump

GitHub Actions workflow

The release runs in .github/workflows/release.yml:
fetch-depth: 0 is required. semantic-release reads the entire git history to find the previous release tag and analyze commits since then. Without the full history, it cannot determine the correct version bump.
RELEASE_TOKEN must be a Personal Access Token, not the default GITHUB_TOKEN. The release commits a version bump back to main, and pushing to a protected branch requires a PAT with Contents: write permission.

CHANGELOG format

The generated CHANGELOG.md follows Keep a Changelog conventions with sections grouped by commit type. Example:
Do not edit CHANGELOG.md manually. Every release overwrites it by prepending the new section at the top.