Spaces:
Running
Running
File size: 1,757 Bytes
b664dbe |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# π Changesets Workflow Guide
## Setup (One Time Only)
### 1. Add NPM Token to GitHub
1. Go to [npmjs.com](https://npmjs.com) β Account β Access Tokens
2. Create **Automation** token with **Publish** permission
3. Copy the token
4. Go to GitHub β Settings β Secrets β Actions
5. Add secret: `NPM_TOKEN` = your token
### 2. Verify Access
Make sure you have publish access to `@lerobot/web` on npm.
## Daily Workflow
### 1. Make Changes
```bash
# Edit code in packages/web/
# Test your changes
pnpm --filter "@lerobot/web" run build
```
### 2. Create Changeset
```bash
pnpm changeset
```
- Select package: `@lerobot/web`
- Choose version bump: `patch` | `minor` | `major`
- Write summary: "Add new feature X" or "Fix bug Y"
### 3. Commit & Push
```bash
git add .
git commit -m "feat: add new functionality"
git push origin main
```
### 4. Magic Happens! β¨
- GitHub Actions creates **Release PR** with changelog
- **Merge the PR** β Automatic publish to npm
- **New version is live!**
## Commands Available
```bash
# Create a changeset (describe your changes)
pnpm changeset
# Preview what will be released
pnpm changeset:version
# Manual publish (emergency only)
pnpm changeset:publish
```
## Version Types
- **patch** (0.1.0 β 0.1.1) - Bug fixes
- **minor** (0.1.0 β 0.2.0) - New features
- **major** (0.1.0 β 1.0.0) - Breaking changes
## Example Flow
```bash
# 1. Edit packages/web/src/calibrate.ts
# 2. Create changeset
pnpm changeset
# β Select @lerobot/web
# β Choose "minor"
# β Summary: "Add new calibration mode"
# 3. Commit
git add .
git commit -m "feat: add new calibration mode"
git push
# 4. GitHub will create Release PR automatically
# 5. Merge PR β @lerobot/[email protected] published! π
```
|