Skip to content

Commit 1ed8db9

Browse files
Guillermo MachadoGuillermo Machado
authored andcommitted
feat: add qa env
1 parent 008f55b commit 1ed8db9

File tree

5 files changed

+77
-2
lines changed

5 files changed

+77
-2
lines changed

.github/workflows/eas-build-qa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- name: ⏱️ EAS Build
4141
uses: ./.github/actions/eas-build
4242
with:
43-
APP_ENV: staging
43+
APP_ENV: qa
4444
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
4545
VERSION: ${{ github.event.release.tag_name }}
4646
IOS: false # TODO: set as true when IOS account is ready
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# 🔗 Links:
2+
# Source file: https://github.com/obytes/react-native-template-obytes/blob/master/.github/workflows/eas-build-qa.yml
3+
# Starter releasing process: https://starter.obytes.com/ci-cd/app-releasing-process/
4+
5+
# ✍️ Description:
6+
# This workflow is used to trigger a build on EAS for the Staging environment.
7+
# It will run on every GitHub release published on the repo or can be triggered manually from the actions tab.
8+
# This workflow will use ./actions/eas-build action to trigger the build on EAS with staging env.
9+
10+
# 🚨 GITHUB SECRETS REQUIRED:
11+
# - EXPO_TOKEN: Expo token to authenticate with EAS
12+
# - You can get it from https://expo.dev/settings/access-tokens
13+
14+
name: EAS Staging Build (Android & IOS) (EAS)
15+
16+
on:
17+
workflow_dispatch:
18+
release:
19+
types: [published]
20+
21+
jobs:
22+
Build:
23+
name: EAS Staging Build (Android & IOS) (EAS)
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Check for EXPO_TOKEN
27+
run: |
28+
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
29+
echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions"
30+
exit 1
31+
fi
32+
- name: 📦 Checkout project repo
33+
uses: actions/checkout@v3
34+
with:
35+
fetch-depth: 0
36+
37+
- name: 📦 Setup Node + PNPM + install deps
38+
uses: ./.github/actions/setup-node-pnpm-install
39+
40+
- name: ⏱️ EAS Build
41+
uses: ./.github/actions/eas-build
42+
with:
43+
APP_ENV: staging
44+
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
45+
VERSION: ${{ github.event.release.tag_name }}
46+
IOS: false # TODO: set as true when IOS account is ready
47+

eas.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,28 @@
4545
"key": "eas-1"
4646
}
4747
},
48+
"qa": {
49+
"channel": "qa",
50+
"distribution": "internal",
51+
"pnpm": "8.15.4",
52+
"ios": {
53+
"image": "latest"
54+
},
55+
"android": {
56+
"buildType": "apk",
57+
"image": "latest"
58+
},
59+
"env": {
60+
"APP_ENV": "qa",
61+
"EXPO_NO_DOTENV": "1",
62+
"FLIPPER_DISABLE": "1"
63+
},
64+
65+
"prebuildCommand": "prebuild --skip-dependency-update react",
66+
"cache": {
67+
"key": "eas-1"
68+
}
69+
},
4870
"development": {
4971
"developmentClient": true,
5072
"distribution": "internal",

env.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const parseBoolean = (/** @type {string | undefined} */ value) =>
107107
value ? value === 'true' : undefined;
108108

109109
const clientEnvSchema = z.object({
110-
APP_ENV: z.enum(['development', 'staging', 'production']),
110+
APP_ENV: z.enum(['development', 'production', 'qa', 'staging']),
111111
NAME: z.string(),
112112
SCHEME: z.string(),
113113
BUNDLE_ID: z.string(),

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,23 @@
1212
"doctor": "npx expo-doctor@latest",
1313
"preinstall": "npx only-allow pnpm",
1414
"start:staging": "cross-env APP_ENV=staging pnpm run start",
15+
"start:qa": "cross-env APP_ENV=qa pnpm run start",
1516
"prebuild:staging": "cross-env APP_ENV=staging pnpm run prebuild",
17+
"prebuild:qa": "cross-env APP_ENV=qa pnpm run prebuild",
1618
"android:staging": "cross-env APP_ENV=staging pnpm run android",
19+
"android:qa": "cross-env APP_ENV=qa pnpm run android",
1720
"ios:staging": "cross-env APP_ENV=staging pnpm run ios",
21+
"ios:qa": "cross-env APP_ENV=qa pnpm run ios",
1822
"start:production": "cross-env APP_ENV=production pnpm run start",
1923
"prebuild:production": "cross-env APP_ENV=production pnpm run prebuild",
2024
"android:production": "cross-env APP_ENV=production pnpm run android",
2125
"ios:production": "cross-env APP_ENV=production pnpm run ios",
2226
"build:development:ios": "cross-env APP_ENV=development EXPO_NO_DOTENV=1 eas build --profile development --platform ios",
2327
"build:development:android": "cross-env APP_ENV=development EXPO_NO_DOTENV=1 eas build --profile development --platform android ",
2428
"build:staging:ios": "cross-env APP_ENV=staging EXPO_NO_DOTENV=1 eas build --profile staging --platform ios",
29+
"build:qa:ios": "cross-env APP_ENV=qa EXPO_NO_DOTENV=1 eas build --profile qa --platform ios",
2530
"build:staging:android": "cross-env APP_ENV=staging EXPO_NO_DOTENV=1 eas build --profile staging --platform android ",
31+
"build:qa:android": "cross-env APP_ENV=qa EXPO_NO_DOTENV=1 eas build --profile qa --platform android ",
2632
"build:production:ios": "cross-env APP_ENV=production EXPO_NO_DOTENV=1 eas build --profile production --platform ios",
2733
"build:production:android": "cross-env APP_ENV=production EXPO_NO_DOTENV=1 eas build --profile production --platform android ",
2834
"postinstall": "husky install",

0 commit comments

Comments
 (0)