This guide covers the release process for Universal Crypto MCP.
We follow Semantic Versioning:
- MAJOR (x.0.0): Breaking changes
- MINOR (0.x.0): New features, backward compatible
- PATCH (0.0.x): Bug fixes, backward compatible
Regular releases for production use:
# Patch release (bug fixes)
pnpm version patch
# Minor release (new features)
pnpm version minor
# Major release (breaking changes)
pnpm version majorFor testing before stable release:
# Alpha release
pnpm version prerelease --preid alpha
# Beta release
pnpm version prerelease --preid beta
# Release candidate
pnpm version prerelease --preid rc# Ensure you're on main branch
git checkout main
git pull origin main
# Run all checks
pnpm ciUpdate CHANGELOG.md with changes:
## [1.2.0] - 2024-01-15
### Added
- New trading tools for Binance futures
- Support for Base chain
### Changed
- Improved gas estimation accuracy
### Fixed
- Fixed balance calculation for ERC20 tokens# Bump version in all packages
pnpm version minorThis will:
- Update version in root
package.json - Update versions in all workspace packages
- Create a git tag
# Push commits and tags
git push origin main --tags# Publish all packages
pnpm publish -r --access publicReleases are automated via GitHub Actions:
When a tag is pushed (e.g., v1.2.0):
- CI runs all tests
- Packages are built
- Packages are published to npm
- GitHub Release is created
- Changelog is attached
# .github/workflows/release.yml
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- run: pnpm install
- run: pnpm build
- run: pnpm test
- run: pnpm publish -r --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: softprops/action-gh-release@v1
with:
generate_release_notes: trueEach package has its own package.json:
{
"name": "@universal-crypto-mcp/core",
"version": "1.2.0",
"publishConfig": {
"access": "public"
},
"files": [
"dist",
"README.md"
]
}All packages use the @universal-crypto-mcp scope:
@universal-crypto-mcp/core
@universal-crypto-mcp/trading-binance
@universal-crypto-mcp/wallet-evm
The main package @nirholas/universal-crypto-mcp bundles everything:
{
"name": "@nirholas/universal-crypto-mcp",
"dependencies": {
"@universal-crypto-mcp/core": "^1.2.0",
"@universal-crypto-mcp/trading-binance": "^1.2.0",
"@universal-crypto-mcp/wallet-evm": "^1.2.0"
}
}We use git-cliff for automated changelog generation:
# Generate changelog
git cliff -o CHANGELOG.md
# Preview next release
git cliff --unreleasedConfiguration in cliff.toml:
[changelog]
header = "# Changelog"
body = """
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
- {{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}]({{ commit.link }}))\
{% endfor %}
{% endfor %}
"""
[git]
conventional_commits = true
commit_parsers = [
{ message = "^feat", group = "Features" },
{ message = "^fix", group = "Bug Fixes" },
{ message = "^doc", group = "Documentation" },
{ message = "^perf", group = "Performance" },
{ message = "^refactor", group = "Refactoring" },
]For urgent fixes to production:
# Create hotfix branch from tag
git checkout -b hotfix/1.2.1 v1.2.0
# Make fix
git commit -m "fix: critical bug"
# Version and release
pnpm version patch
git push origin hotfix/1.2.1 --tags
# Merge back to main
git checkout main
git merge hotfix/1.2.1When making breaking changes:
- Document the change in CHANGELOG.md
- Provide migration guide if needed
- Use major version bump
- Announce in release notes
Example migration guide:
## Migration from v1.x to v2.0
### Breaking Changes
#### `getPrice` returns different format
Before:
```typescript
const price = await getPrice("BTC"); // numberAfter:
const { price, symbol } = await getPrice("BTC"); // object- Update all
getPricecalls to destructure result - Update any code that depends on numeric return value
## Release Checklist
Before each release:
- [ ] All tests passing
- [ ] Linting passes
- [ ] Documentation updated
- [ ] CHANGELOG.md updated
- [ ] Breaking changes documented
- [ ] Migration guide if needed
- [ ] Version bumped correctly
- [ ] Package.json files updated
## Next Steps
- [Development Guide](development.md) - Development workflow
- [Testing Guide](testing.md) - Writing tests