This project uses semantic-release for automated versioning and package publishing based on Conventional Commits.
- Commit Messages: Follow conventional commit format
- Automatic Versioning: Semantic-release analyzes commits and determines version bumps
- Changelog Generation: Automatically generates CHANGELOG.md
- GitHub Releases: Creates GitHub releases with release notes
- Git Tags: Tags releases in the repository
<type>(<scope>): <subject>
[optional body]
[optional footer]
| Type | Description | Version Bump | Example |
|---|---|---|---|
feat |
New feature | Minor (0.x.0) | feat(auth): add OAuth login |
fix |
Bug fix | Patch (0.0.x) | fix(upload): resolve file size error |
perf |
Performance improvement | Patch (0.0.x) | perf(gemini): optimize API calls |
refactor |
Code refactoring | Patch (0.0.x) | refactor(components): move to src/ |
docs |
Documentation | Patch (0.0.x) | docs(readme): update setup guide |
build |
Build system changes | Patch (0.0.x) | build(deps): update vite to v6 |
test |
Test additions/updates | No release | test(auth): add login tests |
ci |
CI/CD changes | No release | ci(actions): add release workflow |
chore |
Maintenance tasks | No release | chore(deps): update dev deps |
| BREAKING CHANGE | Breaking change | Major (x.0.0) | See below |
To trigger a major version bump, include BREAKING CHANGE: in the commit footer:
feat(api): redesign authentication flow
BREAKING CHANGE: The signIn method now requires a role parameter.
Users must update their authentication calls to include the role.
Or use ! after the type/scope:
feat(api)!: redesign authentication flow
Releases happen automatically when commits are pushed to protected branches:
-
Main Branch (
main):- Triggers production releases
- Version:
1.0.0,1.1.0,2.0.0, etc.
-
Beta Branch (
beta):- Triggers pre-releases
- Version:
1.0.0-beta.1,1.0.0-beta.2, etc.
You can manually trigger a release via GitHub Actions:
- Go to Actions → Release workflow
- Click Run workflow
- Select the branch
- Click Run workflow
The release process:
- ✅ Analyzes commit messages since last release
- ✅ Determines version bump based on commit types
- ✅ Updates
package.jsonversion - ✅ Generates/updates
CHANGELOG.md - ✅ Creates a Git tag
- ✅ Pushes changes back to repository
- ✅ Creates GitHub release with notes
- ✅ Attaches build artifacts (
dist/**) - ✅ Comments on related PRs and issues
The changelog is automatically generated in CHANGELOG.md with sections:
- Features - New functionality
- Bug Fixes - Fixes to existing features
- Performance Improvements - Optimizations
- Code Refactoring - Code improvements
- Documentation - Docs updates
- Build System - Build/dependency changes
Tests, CI, and chores are excluded from the changelog.
The release workflow requires a GitHub token with these permissions:
- ✅ contents: write - Update repository files
- ✅ issues: write - Comment on issues
- ✅ pull-requests: write - Comment on PRs
These are automatically provided by ${{ secrets.GITHUB_TOKEN }} in GitHub Actions.
# Create feature branch
git checkout -b feat/awesome-feature
# Make changes with conventional commits
git commit -m "feat(upload): add drag-and-drop support"
git commit -m "test(upload): add drag-drop tests"
git commit -m "docs(readme): document drag-drop feature"
# Push and create PR
git push origin feat/awesome-feature
gh pr create --base main- PR is merged to
main - GitHub Actions automatically triggers
- Semantic-release analyzes commits
- If releasable commits exist:
- Version is bumped (e.g.,
1.2.0→1.3.0) - Changelog is updated
- GitHub release is created
- PR is commented with release info
- Version is bumped (e.g.,
For testing features before production:
# Create feature branch from beta
git checkout -b feat/experimental beta
# Make changes
git commit -m "feat(ai): add GPT-4 support"
# Merge to beta branch
git checkout beta
git merge feat/experimental
git push origin beta
# Semantic-release creates: 1.3.0-beta.1This project follows Semantic Versioning (SemVer):
- MAJOR version (
x.0.0): Breaking changes - MINOR version (
0.x.0): New features (backward compatible) - PATCH version (
0.0.x): Bug fixes and improvements
Configures semantic-release behavior:
- Commit analysis rules
- Changelog generation
- GitHub release settings
- Git commit strategy
GitHub Actions workflow:
- Triggers on
mainandbetabranches - Runs build and tests
- Executes semantic-release
Possible reasons:
-
No releasable commits: Only
chore,test, orcicommits- Solution: Ensure at least one
feat,fix,perf,refactor,docs, orbuildcommit
- Solution: Ensure at least one
-
Invalid commit format: Commits don't follow conventional format
- Solution: Use proper format:
type(scope): subject
- Solution: Use proper format:
-
No changes since last release: All commits already released
- Solution: This is expected behavior
Check GitHub Actions logs:
- Go to Actions → Release workflow
- Click on failed run
- Check error messages
Common issues:
- Token permissions: Ensure
GITHUB_TOKENhas required permissions - Build failure: Fix build errors before release
- Test failure: Fix failing tests
If you need to force a release without waiting for commits:
# Create an empty commit with feat type
git commit --allow-empty -m "feat: trigger release"
git push origin main- Always use conventional commits - Enables automation
- Write descriptive commit messages - Appears in changelog
- Test before merging to main - Avoid broken releases
- Use scopes - Helps organize changelog (
feat(auth):,fix(ui):) - Document breaking changes - Include migration guide in commit body
- Keep PRs focused - One feature/fix per PR for cleaner releases
feat(auth): add Google OAuth integration
fix(upload): resolve file size validation error
perf(gemini): implement response caching
docs(contributing): add release process guide
refactor(components): migrate to folder-per-component patternupdate stuff
fixed bug
WIP
asdf
Updated filesBefore merging to main:
- All tests passing
- Build succeeds
- Commit messages follow conventional format
- Breaking changes documented in commit footer
- CHANGELOG preview looks correct
- PR approved and ready to merge
Questions? See CONTRIBUTING.md or open an issue.