This project follows Semantic Versioning 2.0.0 (SemVer) for all published packages and uses Conventional Commits for standardized commit messages.
- Production releases: Published from the
mainbranch with stable version tags - Alpha releases: Published from
dev,alpha/*,beta/*, orrc/*branches with pre-release tags - Version management: Handled automatically by Changesets
The @wallarm-org/design-system package is published to NPM registry and follows this versioning scheme:
- Major version (X.0.0): Breaking changes
- Minor version (0.X.0): New features, backward compatible
- Patch version (0.0.X): Bug fixes, backward compatible
This project enforces Conventional Commits specification for all commit messages. This leads to:
- Automated version bumps based on commit types
- Organized and readable changelogs
- Clear communication of changes
<type>(<scope>): <subject>
<body>
<footer>
| Type | Description | Version Bump |
|---|---|---|
feat |
New feature | Minor (0.X.0) |
fix |
Bug fix | Patch (0.0.X) |
docs |
Documentation only changes | No bump |
style |
Code style changes (formatting, etc.) | No bump |
refactor |
Code refactoring without feature/fix | No bump |
perf |
Performance improvements | Patch (0.0.X) |
test |
Adding or updating tests | No bump |
build |
Build system or dependency changes | No bump |
ci |
CI/CD configuration changes | No bump |
chore |
Other changes (maintenance) | No bump |
revert |
Reverts a previous commit | Varies |
To indicate a breaking change:
- Add
!after the type/scope:feat!: new API - Or add
BREAKING CHANGE:in the commit body - This will trigger a Major version bump (X.0.0)
# Feature with scope
feat(button): add size variant prop
# Bug fix
fix: resolve tooltip positioning issue
# Breaking change
feat!: redesign component API
BREAKING CHANGE: The `color` prop has been renamed to `variant`
# Documentation update
docs: update installation guideUse the interactive commit tool:
pnpm commit
# or
git czThis will guide you through creating a properly formatted commit message.
-
Create a changeset for your changes:
pnpm changeset
-
Select the appropriate version bump:
patch: Bug fixes and small changesminor: New features that are backward compatiblemajor: Breaking changes
-
Push your changes to a feature branch and create a PR
-
When merged to
main, the CI will:- Create a "Version Packages" PR automatically
- When merged, publish to NPM with the new version
- Create a GitHub release with changelog
Alpha versions are published automatically when pushing to specific branches:
devbranch: For development releasesalpha/*branches: For alpha testingbeta/*branches: For beta testingrc/*branches: For release candidates
You can also trigger an alpha release manually:
- Go to Actions → "Release Alpha" workflow
- Click "Run workflow"
- Select the branch to release from
Alpha versions follow this format: X.Y.Z-alpha.{timestamp}.{commit}
Example: 0.1.0-alpha.20240129120000.abc1234
When making changes that should trigger a version bump:
# Add a changeset
pnpm changeset
# Follow the prompts to:
# 1. Select packages to version
# 2. Choose version bump type
# 3. Write a changelog messageChangesets are stored in .changeset/ directory as markdown files. They contain:
- Packages affected
- Version bump type
- Change description
-
Automated PR Creation: When changesets are pushed to
main, the CI creates a PR that:- Updates package versions
- Updates CHANGELOG.md files
- Removes processed changeset files
-
Review and Merge: Review the version PR and merge when ready
-
Automatic Publishing: Upon merging the version PR:
- Packages are built and published to NPM
- GitHub releases are created with changelogs
- Git tags are created for each release
# Create a conventional commit (interactive)
pnpm commit
# Add a changeset
pnpm changeset
# Update versions based on changesets
pnpm version
# Create alpha version
pnpm version:alpha
# Publish to NPM (CI only)
pnpm release
# Publish alpha version (CI only)
pnpm release:alpha# Interactive commit creation
pnpm commit
# or
git cz
# Standard git commit (will be validated)
git commit -m "feat: add new feature"
# Bypass hooks (NOT recommended)
git commit -m "message" --no-verifyNPM_TOKEN: NPM automation token for publishingGITHUB_TOKEN: Automatically provided by GitHub Actions
- release.yml: Production releases from
mainbranch - release-alpha.yml: Pre-release versions from development branches
- Always use changesets for changes that affect the public API
- Write clear changeset messages that explain the change to users
- Use conventional commits for better changelog generation
- Test alpha versions before promoting to production
- Follow SemVer strictly to avoid breaking consumer applications
- Feature development on
feature/new-buttonbranch - Add changeset with
pnpm changeset - PR to
devbranch → Alpha version published automatically - Testing in alpha:
npm install @wallarm-org/design-system@alpha - PR to
mainbranch → Version PR created - Merge version PR → Production release published
- Users update:
npm install @wallarm-org/design-system@latest
If changes don't trigger a version bump:
- Ensure a changeset was added
- Check
.changeset/config.jsonconfiguration - Verify the package isn't in the
ignorelist
If publishing fails:
- Verify NPM_TOKEN is valid
- Check npm registry status
- Ensure package.json has correct
publishConfig - Review GitHub Actions logs for detailed errors