Skip to content
⌘K
Explore
Download
Docs
Sign in
Sign up
flagon-io
/
g1t
public
Star
0
Overview
Code
Issues
Pull requests
Workflows
Deployments
Insights
Files
Commits
Branches
Tags
Releases
Compare
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.
syntaqx
committed
yesterday
Parent
17a14e1
Browse files
c448de564eac
2
files
+10
−3
0/2 viewed
Files
Collapse all
Unified
Split
.g1t/workflows/mobile-release.yml
+6
−3
View
Blame
Viewed
15
15
#
16
16
# Needs the repository secret EXPO_TOKEN (an Expo access token with access
17
17
# 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).
19
20
name: Mobile release
20
21
21
22
on:
⋯
68
69
path: ~/.npm
69
70
key: npm-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
70
71
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
73
76
- name: Build on EAS
74
77
if: ${{ !inputs.build }}
75
78
env:
scripts/mobile-release.mjs
+4
−0
View
Blame
Viewed
77
77
return finished[0] ?? null;
78
78
}
79
79
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
+
80
84
function run(command, args, options = {}) {
81
85
const result = spawnSync(command, args, { stdio: options.capture ? ["ignore", "pipe", "inherit"] : "inherit", encoding: "utf8", ...options });
82
86
if (result.status !== 0) throw new Error(`${command} ${args.join(" ")} failed`);