This document outlines the release process for publishing new versions of DevXP CLI to npm.
- All tests pass:
npm test - No linting errors:
npm run lint - Code is formatted:
npm run format:check - TypeScript builds successfully:
npm run build - E2E tests pass:
npm run test:e2e
- README.md is up to date
- CHANGELOG.md has been updated with new changes
- API documentation is current
- Examples are working and up to date
- QUICK_START.md reflects any new features
- Version number follows semantic versioning
- Package.json version is correct
- Git tags are ready
Bug fixes and minor updates that don't break compatibility.
npm run releaseNew features that are backward compatible.
npm run release:minorBreaking changes or significant new features.
npm run release:majorgit checkout -b release/v1.0.0
git pull origin main# Update package.json version
npm version patch/minor/major --no-git-tag-version
# Update CHANGELOG.md
# Add release notes under [Unreleased] section
# Move them to new version section with date# Clean install
rm -rf node_modules package-lock.json
npm install
# Run all tests
npm run test:all
# Build project
npm run build
# Test CLI locally
npm link
devxp --version
devxp --help
npm unlinkgit add .
git commit -m "chore: prepare release v1.0.0"git push origin release/v1.0.0
# Create PR on GitHub
# Get approval from maintainersgit checkout main
git pull origin main
git merge --no-ff release/v1.0.0
git tag -a v1.0.0 -m "Release v1.0.0"
git push origin main --tags# Login to npm
npm login
# Verify you're logged in
npm whoami# Dry run first
npm publish --dry-run
# Actual publish
npm publish
# Or use the release script
npm run release # for patch- Go to GitHub releases page
- Click "Create a new release"
- Select the tag you just created
- Title: "v1.0.0 - Release Name"
- Copy changelog entries for this version
- Attach any relevant assets
- Publish release
- Verify package on npm: https://www.npmjs.com/package/devxp-cli
- Test installation:
npm install -g devxp-cli@latest - Update documentation site (if applicable)
- Announce release on social media
- Notify users via Discord/Slack
- Update Docker image (if applicable)
For critical bugs in production:
- Create hotfix branch from main
git checkout -b hotfix/v1.0.1 main- Apply fix and test thoroughly
# Make fixes
npm test
npm run build-
Fast-track through review process
-
Merge directly to main and tag
git checkout main
git merge --no-ff hotfix/v1.0.1
npm version patch
git push origin main --tags
npm publishIf a release has critical issues:
- Unpublish the broken version (within 72 hours)
npm unpublish devxp-cli@1.0.0- Or deprecate it
npm deprecate devxp-cli@1.0.0 "Critical bug, please use 1.0.1"- Publish a fix immediately following the hotfix process
{
"release": "npm version patch && npm publish",
"release:minor": "npm version minor && npm publish",
"release:major": "npm version major && npm publish",
"prepublishOnly": "npm run test:ci && npm run build"
}- Never commit sensitive data or API keys
- Use npm 2FA for publishing
- Regularly audit dependencies:
npm audit - Keep GitHub repository settings secure
- Use signed commits when possible
The CI/CD pipeline automatically:
- Runs tests on all PRs
- Builds and tests on multiple Node versions
- Publishes to npm when a release is tagged
- Updates Docker images
To trigger automated release:
- Push a tag starting with 'v'
- GitHub Actions will handle the rest
For questions about the release process:
- Slack: #devxp-releases
- Email: releases@devxp-cli.com