mirror of
https://github.com/lockin-bot/react-telegram.git
synced 2026-01-12 22:27:38 +08:00
- Add CI workflow for testing, type checking, and building - Add publish workflow for npm releases - Add automated release workflow with changesets - Add PR checks for changesets and formatting - Add security scanning workflow - Add documentation validation workflow - Configure changesets for version management - Add Prettier for code formatting - Add unit tests for core and adapter packages - Add contributing guidelines and release documentation - Configure Dependabot for dependency updates - Update README with CI badges This establishes a complete CI/CD pipeline for automated testing, versioning, and publishing of the React Telegram packages. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2.5 KiB
2.5 KiB
Release Process
This document outlines the release process for React Telegram packages.
Automated Releases (Recommended)
We use Changesets for version management and releases.
Creating a Changeset
When you make changes that should be released:
bun run changeset
This will prompt you to:
- Select which packages have changed
- Choose the version bump type (major, minor, patch)
- Write a summary of the changes
Release Process
- Create changesets for your changes during development
- Merge PRs with changesets to main branch
- Automated PR will be created by the Release workflow
- Review and merge the automated version bump PR
- Packages are published automatically to npm
Manual Release (Emergency)
If you need to manually release:
# 1. Ensure you're on main branch
git checkout main
git pull origin main
# 2. Run tests
bun test
# 3. Build packages
bun run build
# 4. Create changeset and version
bun run changeset
bun run version
# 5. Commit version changes
git add .
git commit -m "chore: version packages"
# 6. Publish to npm
bun run release
# 7. Push changes and tags
git push origin main --follow-tags
Pre-release Versions
For beta/alpha releases:
# Create a beta changeset
bun run changeset pre enter beta
# Make changes and create changesets as normal
# When ready to release
bun run version
bun run release
# Exit pre-release mode
bun run changeset pre exit
GitHub Actions
CI Workflow
- Runs on every push and PR
- Tests, lints, and builds packages
- Validates examples
Release Workflow
- Runs on push to main
- Creates version bump PRs
- Publishes to npm when version PRs are merged
Security Workflow
- Weekly security audits
- Dependency vulnerability scanning
NPM Token Setup
- Create an npm account at npmjs.com
- Generate an access token with publish permissions
- Add as
NPM_TOKENsecret in GitHub repository settings
Troubleshooting
Build Failures
- Check TypeScript errors:
bun run type-check - Clean build artifacts:
bun run clean - Reinstall dependencies:
rm -rf node_modules && bun install
Publishing Failures
- Verify npm authentication:
npm whoami - Check package names are available
- Ensure version hasn't been published already
Changeset Issues
- Reset changeset state:
rm -rf .changeset/pre.json - Manually fix versions in package.json files
- Force version update:
bun run changeset version --no-git-tag