This guide explains how to create releases for the Multi-Platform Tracking SDK.
- NPM Account: You need access to publish
@azmarifdev/multi-platform-tracking-sdk - GitHub Access: Push access to the repository
- NPM Token: Set up in GitHub Secrets as
NPM_TOKEN
npm run release:patch- Bug fixes
- Documentation updates
- Minor improvements
- Version: 1.1.0 → 1.1.1
npm run release:minor- New features
- New platform support
- API additions (non-breaking)
- Version: 1.1.0 → 1.2.0
npm run release:major- Breaking API changes
- Major refactoring
- Platform API changes
- Version: 1.1.0 → 2.0.0
# 1. Ensure you're on main branch
git checkout main
git pull origin main
# 2. Run quality checks
npm run quality
# 3. Run all tests
npm run test:ci
# 4. Build package
npm run buildEdit CHANGELOG.md:
## [1.2.0] - 2025-08-11
### Added
- New Instagram Stories tracking
- Enhanced GTM integration
### Changed
- Improved error handling
### Fixed
- Bug in conversion tracking# For new features (most common)
npm run release:minor
# This will:
# ✅ Run tests and quality checks
# ✅ Update version in package.json
# ✅ Create git tag (e.g., v1.2.0)
# ✅ Push to GitHub
# ✅ Trigger CI/CD pipeline
# ✅ Create GitHub Release
# ✅ Publish to NPMWhen you push a version tag, GitHub Actions will:
- Testing: Run all tests on Node 16, 18, 20
- Quality: ESLint, Prettier, TypeScript checks
- Build: Create distribution files
- Release: Create GitHub release with changelog
- Publish: Publish to NPM registry
# Create release on GitHub
gh release create v1.2.0 \
--title "Multi-Platform Tracking SDK v1.2.0" \
--notes "See CHANGELOG.md for details"# Build and publish manually
npm run build
npm publish- All tests passing
- Quality checks pass
- Documentation updated
- CHANGELOG.md updated
- Version number appropriate
- Breaking changes documented
- GitHub release created
- NPM package published
- Documentation deployed
- Community notified
- Social media posts (optional)
# Deprecate a version (if urgent)
npm deprecate @azmarifdev/multi-platform-tracking-sdk@1.2.0 "Critical bug - use 1.1.9"
# Or unpublish (within 24 hours only)
npm unpublish @azmarifdev/multi-platform-tracking-sdk@1.2.0# Delete a release
gh release delete v1.2.0
# Delete a tag
git tag -d v1.2.0
git push origin :refs/tags/v1.2.0- Patch releases: As needed for bugs
- Minor releases: Monthly with new features
- Major releases: Quarterly or for breaking changes
- Security vulnerabilities: Immediate
- Critical bugs: Within 24 hours
- Platform API changes: Within 1 week
For security vulnerabilities:
- Private Fix: Fix in private branch
- Security Advisory: Create GitHub security advisory
- Coordinated Release: Release fix and advisory together
- Immediate Notification: Notify users immediately
- GitHub Issues: Technical problems
- Email: security@azmarif.dev for security issues
- Discussions: General questions
- NPM Downloads: https://npmjs.com/package/@azmarifdev/multi-platform-tracking-sdk
- GitHub Actions: Check CI/CD status
- GitHub Releases: Monitor release metrics
# Quick patch release
npm run release:patch
# Check what version would be next
npm run release:dry
# Full manual process
git checkout main
git pull origin main
npm run quality
npm run test:ci
npm version minor
git push origin main --tagsThat's it! Your release will be automatically built and published. 🚀