This document outlines the release process for the Mainframe SDK, including versioning, automation, and best practices.
The Mainframe SDK uses semantic versioning with conventional commits to automate releases, changelog generation, and npm publishing through GitHub Actions.
| Type | Description | Version Change | When to Use |
|---|---|---|---|
| patch | Bug fixes, security patches | 1.0.0 → 1.0.1 |
Backward compatible fixes |
| minor | New features, enhancements | 1.0.0 → 1.1.0 |
Backward compatible features |
| major | Breaking changes | 1.0.0 → 2.0.0 |
API breaking changes |
| prerelease | Beta versions | 1.0.0 → 1.0.1-0 |
Testing new features |
# Check current version status
pnpm run check-version
# Create a patch release (bug fixes)
pnpm run release-patch
# Create a minor release (new features)
pnpm run release-minor
# Create a major release (breaking changes)
pnpm run release-major
# Create a prerelease
pnpm run release-pre# Patch release
pnpm run release:patch
# Minor release
pnpm run release:minor
# Major release
pnpm run release:major
# Prerelease
pnpm run release:pre- Go to Actions tab in GitHub
- Select Release & Publish workflow
- Click Run workflow
- Choose release type
- Click Run workflow button
All commits must follow the Conventional Commits specification:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
| Type | Description | Release Impact |
|---|---|---|
feat |
New feature | minor |
fix |
Bug fix | patch |
security |
Security fix | patch |
perf |
Performance improvement | patch |
docs |
Documentation | none |
style |
Code style changes | none |
refactor |
Code refactoring | none |
test |
Adding tests | none |
build |
Build system changes | none |
ci |
CI configuration | none |
chore |
Maintenance tasks | none |
# New feature (minor release)
git commit -m "feat: add agent pause/resume functionality"
# Bug fix (patch release)
git commit -m "fix: resolve encryption key rotation issue"
# Breaking change (major release)
git commit -m "feat!: redesign agent configuration API
BREAKING CHANGE: AgentConfig interface has been restructured"
# Security fix (patch release)
git commit -m "security: implement rate limiting for API calls"
# Performance improvement (patch release)
git commit -m "perf: optimize metadata caching strategy"# Ensure working directory is clean
git status
# Switch to main branch
git checkout main
# Pull latest changes
git pull origin main
# Check version status
pnpm run check-version
# Run all tests
pnpm test
# Run security audit
pnpm run security-audit
# Run linting
pnpm run lint# Example: Create minor release
pnpm run release-minorThis will:
- ✅ Run all pre-release checks
- ✅ Bump version number in package.json
- ✅ Generate changelog entries
- ✅ Create git commit and tag
- ✅ Provide next steps
# Push changes and tags
git push --follow-tags
# CI will automatically:
# - Build and test
# - Publish to npm
# - Create GitHub release
# - Notify DiscordRuns on every push and PR:
- Linting and type checking
- Unit, security, and performance tests
- Build verification
- Security scanning
Triggered by:
- Manual workflow dispatch
- Version changes in package.json
Process:
- Version Check - Detect version changes
- Build & Test - Full test suite
- Publish npm - Publish to registry
- GitHub Release - Create release with changelog
- Notifications - Discord alerts
Set these in GitHub repository secrets:
NPM_TOKEN=npm_xxxxxxxxxxxxx # npm publishing
CODECOV_TOKEN=xxxxxxxxxxxxx # Code coverage
DISCORD_WEBHOOK=https://discord.com/xxx # Release notifications# Check if current version is published
pnpm run check-version
# View published versions
npm view @maikers/mainframe-sdk versions --json
# Check package info
npm info @maikers/mainframe-sdk# Bump version without releasing
pnpm run version:patch
pnpm run version:minor
pnpm run version:major# Verify npm package
npm info @maikers/mainframe-sdk@latest
# Install and test
npm install @maikers/mainframe-sdk@latest
# Check bundle size
npm info @maikers/mainframe-sdk dist.size
# Security audit
npm audit @maikers/mainframe-sdk- ✅ Release notes generated from CHANGELOG.md
- ✅ Assets include source code
- ✅ Tag matches package.json version
- ✅ Installation instructions provided
# Check what's published
npm view @maikers/mainframe-sdk versions
# Create new version
pnpm run release-patch# Stash changes
git stash
# Or commit changes
git add . && git commit -m "chore: prepare for release"# Run specific test suites
pnpm run test:security
pnpm run test:performance
# Fix issues and retry
pnpm run release-patch# Check GitHub Actions logs
# Verify NPM_TOKEN is valid
# Re-run failed workflowFor critical security or bug fixes:
# Create hotfix branch
git checkout -b hotfix/critical-security-fix
# Make minimal changes
# ... fix the issue ...
# Commit with proper message
git commit -m "security: fix critical vulnerability in encryption"
# Merge to main
git checkout main
git merge hotfix/critical-security-fix
# Create patch release
pnpm run release-patch
# Push immediately
git push --follow-tags
# Monitor CI for automatic publishingTrack these metrics for each release:
- Build Time - CI/CD pipeline duration
- Test Coverage - Maintain 90%+ coverage
- Bundle Size - Monitor package size growth
- Security Score - Zero high/critical vulnerabilities
- Download Count - npm package adoption
- GitHub Stars - Community engagement
| Role | Responsibility |
|---|---|
| Maintainers | Approve releases, manage versioning |
| CI/CD | Automated testing and publishing |
| Security | Vulnerability scanning and fixes |
| Community | Bug reports and feature requests |
Need help? Create an issue or ask in Discord for release-related questions.