|
| 1 | +# Release Process |
| 2 | + |
| 3 | +## Automated Releases |
| 4 | + |
| 5 | +MicroUI uses GitHub Actions to automatically create releases when version tags are pushed. |
| 6 | + |
| 7 | +### How to Create a Release |
| 8 | + |
| 9 | +1. **Update version in package.json**: |
| 10 | + ```bash |
| 11 | + npm version patch # For bug fixes (1.0.0 → 1.0.1) |
| 12 | + npm version minor # For new features (1.0.0 → 1.1.0) |
| 13 | + npm version major # For breaking changes (1.0.0 → 2.0.0) |
| 14 | + ``` |
| 15 | + |
| 16 | +2. **Push the tag**: |
| 17 | + ```bash |
| 18 | + git push origin master --tags |
| 19 | + ``` |
| 20 | + |
| 21 | +3. **GitHub Actions will automatically**: |
| 22 | + - Run tests |
| 23 | + - Build all distribution files |
| 24 | + - Create release with generated notes |
| 25 | + - Upload built assets |
| 26 | + - Calculate bundle sizes |
| 27 | + |
| 28 | +### Release Assets |
| 29 | + |
| 30 | +Each release includes: |
| 31 | +- `microui.js` - Development build with source maps |
| 32 | +- `microui.min.js` - Production build, minified |
| 33 | +- `microui.esm.js` - ES modules build |
| 34 | +- `microui-vX.X.X.zip` - Complete package with docs |
| 35 | + |
| 36 | +### Manual Release (if needed) |
| 37 | + |
| 38 | +If you need to create a release manually: |
| 39 | + |
| 40 | +1. **Build the library**: |
| 41 | + ```bash |
| 42 | + npm run build |
| 43 | + ``` |
| 44 | + |
| 45 | +2. **Create a tag**: |
| 46 | + ```bash |
| 47 | + git tag v1.0.0 |
| 48 | + git push origin v1.0.0 |
| 49 | + ``` |
| 50 | + |
| 51 | +3. **Go to GitHub → Releases → Create a new release** |
| 52 | + |
| 53 | +### NPM Publishing |
| 54 | + |
| 55 | +To publish to NPM, uncomment the NPM publish step in `.github/workflows/release.yml` and add your NPM token to GitHub secrets: |
| 56 | + |
| 57 | +1. **Get NPM token**: |
| 58 | + ```bash |
| 59 | + npm adduser |
| 60 | + npm token create |
| 61 | + ``` |
| 62 | + |
| 63 | +2. **Add to GitHub secrets**: |
| 64 | + - Go to repo Settings → Secrets → Actions |
| 65 | + - Add `NPM_TOKEN` with your token |
| 66 | + |
| 67 | +3. **Uncomment lines in release.yml**: |
| 68 | + ```yaml |
| 69 | + - name: Publish to NPM |
| 70 | + run: npm publish |
| 71 | + env: |
| 72 | + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 73 | + ``` |
| 74 | +
|
| 75 | +### Release Notes |
| 76 | +
|
| 77 | +Release notes are automatically generated and include: |
| 78 | +- Version number |
| 79 | +- Asset sizes and bundle analysis |
| 80 | +- Installation instructions |
| 81 | +- Links to documentation and examples |
| 82 | +- CDN usage examples |
| 83 | +
|
| 84 | +### Version Strategy |
| 85 | +
|
| 86 | +MicroUI follows [Semantic Versioning](https://semver.org/): |
| 87 | +- **PATCH** (1.0.1): Bug fixes |
| 88 | +- **MINOR** (1.1.0): New features, backward compatible |
| 89 | +- **MAJOR** (2.0.0): Breaking changes |
0 commit comments