Skip to content

Commit d5a0831

Browse files
authored
feat(ONYX-1904): publish palette-mobile to testflight (#441)
1 parent 736288d commit d5a0831

File tree

10 files changed

+1383
-1213
lines changed

10 files changed

+1383
-1213
lines changed

.easignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.DS_Store
2+
.env
3+
.expo
4+
.cache
5+
dist
6+
web-build/
7+
8+
# Dependencies
9+
10+
node_modules/
11+
\*\*/node_modules/
12+
13+
# Build artifacts
14+
15+
build/
16+
\*\*/build/
17+
18+
# Native folders generated by prebuild
19+
20+
Example/android
21+
Example/ios
22+
23+
# VCS
24+
25+
.git/
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Setup node.js
2+
description: Set up your GitHub Actions workflow with a specific version of node.js
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Setup node.js
7+
uses: actions/setup-node@v4
8+
with:
9+
node-version: "22.14.0"
10+
- name: Enable Corepack
11+
run: corepack enable
12+
shell: bash

.github/workflows/build-ios.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and Submit iOS to TestFlight
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
name: Build and Submit iOS
12+
runs-on: macos-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: ./.github/actions/setup-node
19+
20+
- name: Setup EAS
21+
uses: expo/expo-github-action@v8
22+
with:
23+
eas-version: latest
24+
token: ${{ secrets.EXPO_TOKEN }}
25+
26+
- name: Configure AWS credentials
27+
uses: aws-actions/configure-aws-credentials@v4
28+
with:
29+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
30+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
31+
aws-region: us-east-1
32+
33+
- name: Install dependencies
34+
run: corepack yarn install
35+
36+
- name: Download fonts
37+
working-directory: ./Example
38+
run: ./download-fonts
39+
40+
- name: Build IPA
41+
working-directory: ./Example
42+
run: eas build --platform ios --profile beta --local --non-interactive --output build.ipa
43+
44+
- name: Submit to TestFlight
45+
working-directory: ./Example
46+
run: eas submit --platform ios --profile beta --path build.ipa --non-interactive

Example/app.json

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
{
22
"expo": {
3-
"name": "PaletteMobile",
3+
"name": "Palette Mobile",
44
"slug": "palettemobile",
55
"splash": {
66
"image": "./assets/icons/app_icon.png",
77
"resizeMode": "contain",
88
"backgroundColor": "#ffffff"
99
},
1010
"ios": {
11-
"bundleIdentifier": "com.artsymobile.palettemobile",
12-
"sipportTable": true,
13-
"icon": "./assets/icons/app_icon.png"
11+
"bundleIdentifier": "net.artsy.palette-mobile",
12+
"supportsTablet": true,
13+
"icon": "./assets/icons/app_icon.png",
14+
"infoPlist": {
15+
"ITSAppUsesNonExemptEncryption": false
16+
}
1417
},
1518
"android": {
16-
"package": "com.artsymobile.palettemobile",
19+
"package": "net.artsy.palettemobile",
1720
"adaptiveIcon": {
1821
"foregroundImage": "./assets/icons/app_icon_android.png",
1922
"backgroundColor": "#ffffff"
@@ -31,6 +34,18 @@
3134
]
3235
}
3336
]
34-
]
37+
],
38+
"extra": {
39+
"eas": {
40+
"projectId": "9dda6017-e129-435c-aad8-3ece8b207ee9"
41+
}
42+
},
43+
"owner": "artsy_org",
44+
"runtimeVersion": {
45+
"policy": "appVersion"
46+
},
47+
"updates": {
48+
"url": "https://u.expo.dev/9dda6017-e129-435c-aad8-3ece8b207ee9"
49+
}
3550
}
3651
}

Example/download-fonts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
set -euxo pipefail
3+
4+
echo "[download-fonts] Starting font download"
5+
6+
# Get fonts from energy s3 bucket
7+
aws s3 cp s3://artsy-citadel/energy/fonts.tar.gz ./fonts.tar.gz
8+
9+
# Extract fonts to a temporary fonts repo
10+
tar -xvzf fonts.tar.gz -C ./assets/fonts
11+
12+
# Cleanup
13+
rm -rf ./fonts.tar.gz
14+
15+
echo "[download-fonts] Fonts downloaded and extracted"

Example/eas-build-pre-install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
./download-fonts

Example/eas.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"cli": {
3+
"version": ">= 13.2.0",
4+
"appVersionSource": "local"
5+
},
6+
"build": {
7+
"development": {
8+
"developmentClient": true,
9+
"distribution": "internal"
10+
},
11+
"beta": {
12+
"distribution": "store",
13+
"ios": {
14+
"buildConfiguration": "Release"
15+
},
16+
"autoIncrement": true,
17+
"channel": "beta"
18+
},
19+
"production": {
20+
"distribution": "store",
21+
"autoIncrement": true
22+
}
23+
},
24+
"submit": {
25+
"beta": {
26+
"ios": {
27+
"ascAppId": "6443736418"
28+
}
29+
},
30+
"production": {
31+
"ios": {}
32+
}
33+
}
34+
}

Example/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
{
22
"name": "palette-mobile-example",
3-
"version": "1.0.0",
3+
"version": "22.7.0",
44
"private": true,
55
"main": "index.js",
66
"scripts": {
77
"android": "expo run:android --port 8082",
8+
"beta:ios": "eas build --platform ios --profile beta --local --output build.ipa && eas submit --platform ios --profile beta --path build.ipa",
9+
"beta:ios:ci": "gh workflow run build-ios.yml -r $(git branch --show-current)",
10+
"update:beta": "eas update --branch beta",
811
"ios": "expo run:ios --port 8082",
912
"start": "npx expo start --port 8082",
1013
"start:reset-cache": "npx expo start -c --port 8082",
@@ -25,6 +28,8 @@
2528
"@storybook/react-native": "^8.6.2",
2629
"expo": "54.0.20",
2730
"expo-dev-client": "6.0.16",
31+
"expo-font": "14.0.9",
32+
"expo-updates": "~29.0.16",
2833
"react": "19.1.0",
2934
"react-dom": "19.1.0",
3035
"react-native": "0.81.5",

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,43 @@ or
7575
yarn android
7676
```
7777

78+
## Deployment
79+
80+
### Building and Deploying iOS to TestFlight
81+
82+
**Local Build (requires Fastlane):**
83+
84+
```sh
85+
brew install gh # First time only
86+
brew install fastlane # First time only
87+
cd Example
88+
yarn beta:ios
89+
```
90+
91+
The build will run locally and will create a "Submission Version Build iOS App Store submission" entry on https://expo.dev/accounts/artsy_org/projects/palettemobile
92+
93+
**Cloud Build via GitHub Actions:**
94+
95+
```sh
96+
cd Example
97+
yarn beta:ios:ci
98+
```
99+
100+
Or trigger manually from [GitHub Actions](https://github.com/artsy/palette-mobile/actions/workflows/build-ios.yml)
101+
102+
The build will run a GitHub Workflow and will create a "Submission Version Build iOS App Store submission" entry on https://expo.dev/accounts/artsy_org/projects/palettemobile
103+
104+
### Publishing Over-the-Air Updates
105+
106+
After building and deploying to TestFlight, you can publish JavaScript/asset updates instantly without App Store review:
107+
108+
```sh
109+
cd Example
110+
yarn update:beta
111+
```
112+
113+
Users will receive the update on their next app launch. OTA updates are ideal for bug fixes, minor features, and content changes that don't require native code changes.
114+
78115
## Developing Features using Local Versions of Palette
79116

80117
When developing new components in Palette, it's often useful to test those components in consuming apps (such as Eigen). However, due to the poor support for symlinks in React Native, this can be difficult. Enter [yalc](https://github.com/wclr/yalc). Yalc is a mini package manager that one can publish to and install from, which makes it easy to test code in realtime from outside of your app.

0 commit comments

Comments
 (0)