Skip to content

Commit b9aef0f

Browse files
Moved docs into folder.
1 parent c71b370 commit b9aef0f

File tree

7 files changed

+200
-123
lines changed

7 files changed

+200
-123
lines changed
Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ A complete alternative to Expo.dev for building Android APKs **without paying $2
2020

2121
## What Got Created
2222

23-
| File | Purpose |
24-
|------|---------|
23+
| File | Purpose |
24+
| ------------------------------------------- | ---------------------------------------------- |
2525
| `.github/workflows/local-android-build.yml` | **The actual workflow** - runs on your machine |
26-
| `LOCAL_BUILD_QUICKSTART.md` | Quick 5-step reference |
27-
| `LOCAL_BUILD_SETUP.md` | Complete setup guide with prerequisites |
28-
| `LOCAL_BUILD_TROUBLESHOOTING.md` | Solutions for 15+ common issues |
29-
| `LOCAL_BUILD_ARCHITECTURE.md` | Visual diagrams & architecture |
30-
| `IMPLEMENTATION_SUMMARY.md` | Overview & comparison |
26+
| `LOCAL_BUILD_QUICKSTART.md` | Quick 5-step reference |
27+
| `LOCAL_BUILD_SETUP.md` | Complete setup guide with prerequisites |
28+
| `LOCAL_BUILD_TROUBLESHOOTING.md` | Solutions for 15+ common issues |
29+
| `LOCAL_BUILD_ARCHITECTURE.md` | Visual diagrams & architecture |
30+
| `IMPLEMENTATION_SUMMARY.md` | Overview & comparison |
3131

3232
---
3333

@@ -52,6 +52,7 @@ git config user.name
5252
```
5353

5454
**If ANDROID_HOME is empty:**
55+
5556
```bash
5657
export ANDROID_HOME=~/Android/Sdk
5758
echo 'export ANDROID_HOME=~/Android/Sdk' >> ~/.zshrc
@@ -67,8 +68,8 @@ source ~/.zshrc
6768
5. **Name it:** "local-android-runner"
6869
6. **Expiration:** 90 days (or longer)
6970
7. **Select scopes:** Check ✅:
70-
- `repo` (Full control of private repositories)
71-
- `admin:repo_hook` (Read/write access to hooks)
71+
- `repo` (Full control of private repositories)
72+
- `admin:repo_hook` (Read/write access to hooks)
7273
8. Click: **Generate token**
7374
9. **Copy it immediately** and save somewhere secure (you won't see it again!)
7475

@@ -118,6 +119,7 @@ sudo ./svc.sh status
118119
5. Should show: **Green dot with "Idle"**
119120

120121
If it shows red/offline:
122+
121123
```bash
122124
cd ~/.github-runner
123125
./run.sh --diagnostics
@@ -134,6 +136,7 @@ cd ~/.github-runner
134136
7. Watch the build run in real-time!
135137

136138
**Build time:**
139+
137140
- First build (cold): 20-30 minutes
138141
- Future builds (warm cache): 5-10 minutes
139142

@@ -144,11 +147,13 @@ cd ~/.github-runner
144147
### Download Your APK
145148

146149
**Option A: From GitHub Actions**
150+
147151
- Go to **Actions** tab → Your workflow run
148152
- Scroll down to **Artifacts**
149153
- Download `android-apk-local`
150154

151155
**Option B: From GitHub Releases**
156+
152157
- Go to **Releases** tab (right side, above tags)
153158
- Download the APK file from the release
154159

@@ -167,15 +172,18 @@ adb -e install app-release-v1.0.80-build-*.apk
167172
## How to Use Going Forward
168173

169174
### Automatic Builds (Every Push)
175+
170176
The workflow runs automatically on every push to any branch.
171177

172178
### Manual Builds Anytime
179+
173180
1. GitHub: **Actions** tab
174181
2. **Local Android Build (Self-Hosted)**
175182
3. **Run workflow**
176183
4. Done! Check progress in real-time
177184

178185
### Check Build Status
186+
179187
- GitHub: **Actions** tab → Your workflow run
180188
- See real-time logs, errors, artifacts, and releases
181189

@@ -184,21 +192,25 @@ The workflow runs automatically on every push to any branch.
184192
## Key Features
185193

186194
**Cost Savings**
195+
187196
- No Expo.dev subscription
188197
- No build credits to buy
189198
- Only pay for electricity (~$5-20/month)
190199

191200
**Version Management**
201+
192202
- Auto-increments version on main branch
193203
- Pre-release versions for dev branches
194204
- Build metadata tracked
195205

196206
**GitHub Integration**
207+
197208
- Automatic releases created
198209
- Changelogs generated from git commits
199210
- Artifacts retained for 14 days
200211

201212
**Full Control**
213+
202214
- Customize build process
203215
- Full access to Gradle configuration
204216
- Can adjust build parameters
@@ -207,14 +219,14 @@ The workflow runs automatically on every push to any branch.
207219

208220
## Troubleshooting Quick Links
209221

210-
| Problem | Solution |
211-
|---------|----------|
212-
| Runner offline | See `LOCAL_BUILD_SETUP.md` Step 2 |
213-
| ANDROID_HOME not found | Set it: `export ANDROID_HOME=~/Android/Sdk` |
214-
| Java wrong version | Install Java 17: `sudo apt install openjdk-17-jdk` |
215-
| Build never starts | Check runner is online (Step 4 above) |
216-
| APK not generated | See `LOCAL_BUILD_TROUBLESHOOTING.md` #7 |
217-
| Other issues | See `LOCAL_BUILD_TROUBLESHOOTING.md` |
222+
| Problem | Solution |
223+
| ---------------------- | -------------------------------------------------- |
224+
| Runner offline | See `LOCAL_BUILD_SETUP.md` Step 2 |
225+
| ANDROID_HOME not found | Set it: `export ANDROID_HOME=~/Android/Sdk` |
226+
| Java wrong version | Install Java 17: `sudo apt install openjdk-17-jdk` |
227+
| Build never starts | Check runner is online (Step 4 above) |
228+
| APK not generated | See `LOCAL_BUILD_TROUBLESHOOTING.md` #7 |
229+
| Other issues | See `LOCAL_BUILD_TROUBLESHOOTING.md` |
218230

219231
---
220232

@@ -272,12 +284,14 @@ App runs on your device! ✅
272284
## Cost Comparison
273285

274286
### With Local Build (YOUR NEW SETUP)
287+
275288
- Initial setup: 15 minutes
276289
- Monthly cost: $5-20 (your electricity)
277290
- Build limit: Unlimited (while online)
278291
- **Annual cost: $60-240**
279292

280293
### With EAS Only (Old Way)
294+
281295
- Setup: Already done
282296
- Monthly cost: $20-100+
283297
- Build limit: Depends on plan
@@ -291,14 +305,15 @@ App runs on your device! ✅
291305

292306
You can use both workflows:
293307

294-
| Use This | When | Why |
295-
|----------|------|-----|
296-
| **Local Build** | Building Android APK | Free, instant, full control |
297-
| **Local Build** | You're at your machine | Saves money |
298-
| **EAS Build** | Building iOS app | Local build can't do iOS |
299-
| **EAS Build** | Your machine is offline | Doesn't depend on your computer |
308+
| Use This | When | Why |
309+
| --------------- | ----------------------- | ------------------------------- |
310+
| **Local Build** | Building Android APK | Free, instant, full control |
311+
| **Local Build** | You're at your machine | Saves money |
312+
| **EAS Build** | Building iOS app | Local build can't do iOS |
313+
| **EAS Build** | Your machine is offline | Doesn't depend on your computer |
300314

301315
To switch:
316+
302317
1. Just keep both workflows enabled
303318
2. Use GitHub branch protection rules to control which builds are required
304319
3. Manually choose which to trigger
@@ -341,6 +356,7 @@ sudo ./svc.sh uninstall && rm -rf ~/.github-runner
341356
## You're Ready! 🎉
342357

343358
You now have:
359+
344360
- ✅ A new workflow that builds APKs locally
345361
- ✅ No Expo.dev charges for the next 3+ days
346362
- ✅ Full version control and GitHub integration
@@ -356,16 +372,19 @@ Questions? See the troubleshooting guide or check GitHub Actions logs.
356372
## Summary
357373

358374
**What changed:**
375+
359376
- New workflow file: `.github/workflows/local-android-build.yml`
360377
- Runs on YOUR machine (self-hosted runner)
361378
- Builds APKs without Expo charges
362379

363380
🚀 **What you need to do:**
381+
364382
1. Create GitHub PAT token
365383
2. Set up actions runner on your machine
366384
3. Trigger a build manually to test
367385

368386
💰 **What you save:**
387+
369388
- $20-100/month in Expo.dev charges
370389
- $240-1200/year!
371390

0 commit comments

Comments
 (0)