|
| 1 | +# 🚀 Release Guide |
| 2 | + |
| 3 | +Complete guide for releasing new versions of Milo with auto-updates. |
| 4 | + |
| 5 | +## Quick Release |
| 6 | + |
| 7 | +```bash |
| 8 | +# 1. Export signing key |
| 9 | +export TAURI_SIGNING_PRIVATE_KEY=$(cat ~/.tauri/milo.key) |
| 10 | + |
| 11 | +# 2. Run automated release |
| 12 | +pnpm release v0.1.13 |
| 13 | + |
| 14 | +# 3. Push to GitHub |
| 15 | +git push origin master && git push origin v0.1.13 |
| 16 | + |
| 17 | +# 4. Create GitHub release and upload files (see below) |
| 18 | +``` |
| 19 | + |
| 20 | +## 📁 File Locations After Build |
| 21 | + |
| 22 | +After running `pnpm release v0.1.13`, you'll find these files: |
| 23 | + |
| 24 | +### **For User Downloads:** |
| 25 | +``` |
| 26 | +src-tauri/target/release/bundle/dmg/ |
| 27 | +└── Milo_0.1.13_x64.dmg |
| 28 | +``` |
| 29 | + |
| 30 | +### **For Auto-Updates:** |
| 31 | +``` |
| 32 | +src-tauri/target/release/bundle/macos/ |
| 33 | +├── Milo.app.tar.gz |
| 34 | +└── Milo.app.tar.gz.sig |
| 35 | +``` |
| 36 | + |
| 37 | +### **Update Manifest:** |
| 38 | +``` |
| 39 | +project-root/ |
| 40 | +└── latest.json |
| 41 | +``` |
| 42 | + |
| 43 | +## 📤 GitHub Release Upload |
| 44 | + |
| 45 | +Create a new release on GitHub and upload these files: |
| 46 | + |
| 47 | +1. **`Milo_0.1.13_x64.dmg`** (from `/dmg/` folder) |
| 48 | + - For users to download and install |
| 49 | + |
| 50 | +2. **`Milo.app.tar.gz`** (from `/macos/` folder) |
| 51 | + - For automatic updates |
| 52 | + |
| 53 | +3. **`latest.json`** (from project root) |
| 54 | + - Update manifest (tells app about new version) |
| 55 | + |
| 56 | +## 🔐 First Time Setup |
| 57 | + |
| 58 | +### Generate Signing Key (Once) |
| 59 | +```bash |
| 60 | +pnpm tauri signer generate -w ~/.tauri/milo.key --password test123 |
| 61 | +``` |
| 62 | + |
| 63 | +### Back Up Your Key |
| 64 | +**CRITICAL:** Store these securely in your password manager: |
| 65 | +- File: `~/.tauri/milo.key` |
| 66 | +- Password: `test123` |
| 67 | +- Note: "Required for Milo app updates. If lost, cannot release updates." |
| 68 | + |
| 69 | +## 🎯 What Each Script Does |
| 70 | + |
| 71 | +### `pnpm release v0.1.13` |
| 72 | +1. ✅ **Validates signing key** setup |
| 73 | +2. ✅ **Updates versions** in `Cargo.toml`, `package.json`, `tauri.conf.json` |
| 74 | +3. ✅ **Builds app** with cryptographic signatures |
| 75 | +4. ✅ **Extracts signatures** from build artifacts |
| 76 | +5. ✅ **Generates latest.json** with update information |
| 77 | +6. ✅ **Commits and tags** (optional) |
| 78 | + |
| 79 | +## 🔍 Troubleshooting |
| 80 | + |
| 81 | +### "Signing key not found" |
| 82 | +```bash |
| 83 | +# Generate new key |
| 84 | +pnpm tauri signer generate -w ~/.tauri/milo.key --password test123 |
| 85 | +``` |
| 86 | + |
| 87 | +### "Environment variables not set" |
| 88 | +```bash |
| 89 | +# Set signing key |
| 90 | +export TAURI_SIGNING_PRIVATE_KEY=$(cat ~/.tauri/milo.key) |
| 91 | +export TAURI_SIGNING_PRIVATE_KEY_PASSWORD="test123" |
| 92 | +``` |
| 93 | + |
| 94 | +### "Build failed" |
| 95 | +- Ensure all dependencies installed: `pnpm install` |
| 96 | +- Check Rust toolchain: `rustup update` |
| 97 | +- Verify key permissions: `ls -la ~/.tauri/milo.key` |
| 98 | + |
| 99 | +### "No signature files found" |
| 100 | +- Build completed but signatures missing |
| 101 | +- Manual signatures will be created in `latest.json` |
| 102 | +- Check that `createUpdaterArtifacts: true` in `tauri.conf.json` |
| 103 | + |
| 104 | +## 🎉 Auto-Update Flow |
| 105 | + |
| 106 | +1. **User has** Milo v0.1.12 installed |
| 107 | +2. **You release** v0.1.13 using this process |
| 108 | +3. **App checks** `latest.json` on startup |
| 109 | +4. **Shows update** notification if newer version found |
| 110 | +5. **Downloads** `Milo.app.tar.gz` automatically |
| 111 | +6. **Installs** and restarts with new version |
| 112 | + |
| 113 | +## 📋 Release Checklist |
| 114 | + |
| 115 | +- [ ] Signing key backed up securely |
| 116 | +- [ ] Environment variables set |
| 117 | +- [ ] Version number follows semantic versioning |
| 118 | +- [ ] Run `pnpm release vX.X.X` |
| 119 | +- [ ] Review generated `latest.json` |
| 120 | +- [ ] Push to GitHub: `git push origin master && git push origin vX.X.X` |
| 121 | +- [ ] Create GitHub release |
| 122 | +- [ ] Upload DMG file from `/dmg/` folder |
| 123 | +- [ ] Upload `Milo.app.tar.gz` from `/macos/` folder |
| 124 | +- [ ] Upload `latest.json` from project root |
| 125 | +- [ ] Test auto-update on previous version |
| 126 | + |
| 127 | +## 🤖 Alternative: Automated Releases |
| 128 | + |
| 129 | +For fully automated releases, set up GitHub Actions with: |
| 130 | +- `TAURI_SIGNING_PRIVATE_KEY` (base64 encoded key) |
| 131 | +- `TAURI_SIGNING_PRIVATE_KEY_PASSWORD` |
| 132 | + |
| 133 | +Then releases happen automatically on git tag push! |
0 commit comments