Skip to content

Commit 61e8489

Browse files
author
Lalit Sharma
committed
feat: update eas-build.yml to remove path filters on push; enhance self-hosted macOS runner documentation with setup and troubleshooting details
1 parent 30c727b commit 61e8489

2 files changed

Lines changed: 78 additions & 11 deletions

File tree

.github/workflows/eas-build.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ name: Self-Hosted Mobile Build & Submit
33
on:
44
push:
55
branches: [main]
6-
paths:
7-
- "apps/mobile/**"
8-
- "packages/**"
9-
- "pnpm-lock.yaml"
106
workflow_dispatch:
117
inputs:
128
platform:

documents/self-hosted-macos-runner.md

Lines changed: 78 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,26 @@ The updated workflows run on the label set:
99

1010
Assumption: builds stay local (`eas build --local`) so they do not consume EAS cloud build quota.
1111

12+
## 0. Runner requirements from workflow files
13+
14+
The current workflows require this exact label set in `runs-on`:
15+
16+
- `self-hosted`
17+
- `macOS`
18+
- `eclipse-timer`
19+
20+
Where this is used:
21+
22+
- `.github/workflows/ci.yml`
23+
- `.github/workflows/eas-build.yml` (all jobs)
24+
25+
If a workflow is queued and never picked up, first check in GitHub UI:
26+
27+
1. `Settings -> Actions -> Runners`.
28+
2. Open your runner.
29+
3. Confirm labels include all three values above, especially custom label `eclipse-timer`.
30+
4. Confirm the runner group is allowed for this repository.
31+
1232
## 1. One-time machine prerequisites
1333

1434
Run these on the Mac mini:
@@ -43,10 +63,16 @@ Node and pnpm:
4363

4464
```bash
4565
node -v
46-
corepack enable
66+
npm -v
67+
npm install -g pnpm@9
4768
pnpm -v
4869
```
4970

71+
Notes:
72+
73+
1. Node 25 may not include `corepack` by default.
74+
2. Workflow jobs use Node 20 (`actions/setup-node@v4` with `node-version: 20`), so using Node 20 on the Mac mini keeps behavior closest to CI.
75+
5076
## 2. Create the self-hosted runner
5177

5278
In GitHub:
@@ -75,9 +101,42 @@ From `~/actions-runner`:
75101
./svc.sh status
76102
```
77103

78-
If your org policy allows it, also set the Mac mini to auto-login and prevent sleep while plugged in for stable CI uptime.
104+
Headless caveat:
105+
106+
1. On some headless setups, `svc.sh` (LaunchAgent) may fail to load without an active GUI user session.
107+
2. If that happens, use foreground mode (`./run.sh`) or the background fallback below.
108+
109+
## 4. Headless fallback (works without LaunchAgent)
110+
111+
Start in background (from `~/actions-runner`):
112+
113+
```bash
114+
cd ~/actions-runner
115+
nohup ./run.sh > runner.log 2>&1 &
116+
echo $! > runner.pid
117+
disown
118+
```
119+
120+
Check status/log:
121+
122+
```bash
123+
cd ~/actions-runner
124+
ps -p "$(cat runner.pid)" -o pid,command
125+
tail -n 100 runner.log
126+
```
127+
128+
Stop runner:
79129

80-
## 4. Repo secrets needed
130+
```bash
131+
cd ~/actions-runner
132+
if [ -f runner.pid ]; then
133+
kill "$(cat runner.pid)" || true
134+
rm -f runner.pid
135+
fi
136+
pkill -f "Runner.Listener run" || true
137+
```
138+
139+
## 5. Repo secrets needed
81140

82141
Set these in `Settings -> Secrets and variables -> Actions`:
83142

@@ -89,7 +148,7 @@ If you use automated submit:
89148
1. Make sure EAS submit credentials are already configured for Apple and Google Play.
90149
2. Keep `submit` job gated by the `production` environment approval in GitHub.
91150

92-
## 5. Workflow behavior after this change
151+
## 6. Workflow behavior after this change
93152

94153
- `.github/workflows/ci.yml`: runs typecheck/lint/test on self-hosted macOS runner.
95154
- `.github/workflows/eas-build.yml`:
@@ -100,7 +159,16 @@ If you use automated submit:
100159
- Uploads local artifacts (`ios.ipa`, `android.aab`) to the workflow run.
101160
- Optional submit job sends those artifacts using `eas submit --path ...`.
102161

103-
## 6. First validation run
162+
Trigger conditions:
163+
164+
1. `ci.yml` runs only on:
165+
- push to `main`
166+
- pull request targeting `main`
167+
2. `eas-build.yml` runs on:
168+
- every push to `main`
169+
- manual `workflow_dispatch`
170+
171+
## 7. First validation run
104172

105173
1. In GitHub Actions, run `Self-Hosted Mobile Build & Submit`.
106174
2. Inputs:
@@ -109,10 +177,13 @@ If you use automated submit:
109177
3. Confirm build artifacts are attached to the run.
110178
4. Then run once with `submit: true` when store credentials are confirmed.
111179

112-
## 7. Common issues
180+
## 8. Common issues
113181

114182
1. Runner never picked:
115-
- Check runner is online and has label `eclipse-timer`.
183+
- Check runner is online.
184+
- Check labels include `self-hosted`, `macOS`, and `eclipse-timer`.
185+
- Check runner group permissions include this repository.
186+
- If `svc.sh` mode fails on headless macOS, run with `nohup ./run.sh ...`.
116187
2. iOS signing failures:
117188
- Re-check distribution cert/profile setup in your EAS credentials.
118189
3. Android signing failures:

0 commit comments

Comments
 (0)