Skip to content

Commit

The phone app's release workflow installs the app's dependencies as well as Wrangler (EAS reads app.config.ts through the app's own expo), and scripts/mobile-release.mjs trims EXPO_TOKEN, as the build workflow does.

syntaqxcommitted Parent17a14e1Browse files
2 files+10−30/2 viewed
+6−3
1515 #
1616 # Needs the repository secret EXPO_TOKEN (an Expo access token with access
1717 # to the g1t project), CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID as the
18−# deploy has them.
18+# deploy has them, and Expo's hosts as workflow-only domains (mobile-build.yml
19+# lists them).
1920 name: Mobile release
2021
2122 on:
6869 path: ~/.npm
6970 key: npm-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
7071 restore-keys: npm-${{ runner.os }}-
71− - name: Install Wrangler
72− run: npm ci --prefer-offline --workspaces=false --no-audit --no-fund
72+ # Wrangler, from the root, and the app's own (EAS reads app.config.ts
73+ # through its `expo`).
74+ - name: Install Wrangler and the app
75+ run: npm ci --prefer-offline --no-audit --no-fund -w @g1t/mobile --include-workspace-root
7376 - name: Build on EAS
7477 if: ${{ !inputs.build }}
7578 env:
+4−0
7777 return finished[0] ?? null;
7878 }
7979
80+// A token pasted with a newline breaks the request's header, and EAS says
81+// only that its GraphQL request failed.
82+if (process.env.EXPO_TOKEN) process.env.EXPO_TOKEN = process.env.EXPO_TOKEN.trim();
83+
8084 function run(command, args, options = {}) {
8185 const result = spawnSync(command, args, { stdio: options.capture ? ["ignore", "pipe", "inherit"] : "inherit", encoding: "utf8", ...options });
8286 if (result.status !== 0) throw new Error(`${command} ${args.join(" ")} failed`);