This document describes how to release a new version of PanelGrid.
PanelGrid uses commit-and-tag-version to automate version bumping, CHANGELOG generation, and git tagging. The tool analyzes commit messages following Conventional Commits to determine the appropriate version bump.
Before releasing, ensure:
- All changes are committed to the
mainbranch - CI tests are passing
- You have push access to the repository
- You're on the latest
mainbranch:git pull origin main
Run the release command to automatically update version, CHANGELOG, and create a git tag:
# Auto-detect version bump based on commits
yarn release
# Or manually specify the bump type:
yarn release:patch # 0.3.0 → 0.3.1
yarn release:minor # 0.3.0 → 0.4.0
yarn release:major # 0.3.0 → 1.0.0
# Preview changes without making them:
yarn release:dry-runReview what was generated:
git show HEAD # View the release commit
cat CHANGELOG.md # Check the updated CHANGELOGIf needed, undo the release with:
git reset --hard HEAD~1
git tag -d v$(node -p "require('./package.json').version")Push both the commit and the tag to trigger the automated publish workflow:
git push --follow-tagsThis triggers GitHub Actions to:
- Run tests, linting, and type checking
- Build the package
- Publish to npm
- Create a GitHub Release
- Check GitHub Actions for workflow status
- Verify the new version on npmjs.com/package/panelgrid
- Confirm the release in GitHub Releases
The tool determines version bumps based on commit messages:
| Commit Type | Example | Version Bump |
|---|---|---|
fix: |
fix: Resolve collision bug |
Patch (0.3.0 → 0.3.1) |
feat: |
feat: Add new resize handles |
Minor (0.3.0 → 0.4.0) |
feat!: or BREAKING CHANGE: |
feat!: Change API signature |
Major (0.3.0 → 1.0.0) |
Note: Commits with types docs:, test:, chore:, ci:, build:, style: are excluded from the CHANGELOG.
The release process is configured in:
.versionrc.json- commit-and-tag-version configurationpackage.json- Release scripts.github/workflows/publish.yml- npm publish automation