Skip to content
Merged
43 changes: 43 additions & 0 deletions .github/workflows/build-and-submit-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build & Submit Production

on:
pull_request:
branches: [main] # Target branch is 'main'
paths-ignore: ["docs/**"]
types: [opened, reopened] # Avoid triggering on new commits

jobs:
build:
if: github.head_ref == 'dev' # Only run if PR is from 'dev'
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn

- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: 16.1.0
token: ${{ secrets.EAS_TOKEN }}

- name: Install dependencies
run: yarn install

- name: Trigger Android Production Build
run: eas build --platform android --profile production --non-interactive --no-wait

# - name: Trigger iOS Production Build
# run: eas build --platform ios --profile production --non-interactive --no-wait

- name: Submit Android Build to Store
run: eas submit --platform android --profile production --non-interactive

# - name: Submit iOS Build to Store
# run: eas submit --platform ios --profile production --non-interactive
32 changes: 32 additions & 0 deletions .github/workflows/ota-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: OTA Publish to Production

on:
pull_request:
branches: [main]
types: [opened, reopened]
jobs:
publish-ota:
if: startsWith(github.head_ref, 'ota/')
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn

- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: 16.1.0
token: ${{ secrets.EAS_TOKEN }}

- name: Install dependencies
run: yarn install

- name: Publish OTA to Production Channel
run: eas update --channel production --platform android --non-interactive
38 changes: 38 additions & 0 deletions .github/workflows/preview-android-feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Preview Android Build (Feature Branch)

on:
pull_request:
branches: [dev]
paths-ignore:
- "**.md"
- "docs/**"
types: [opened, reopened]

jobs:
build:
name: Build Android Preview
if: startsWith(github.head_ref, 'feature/')
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn

- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EAS_TOKEN }}

- name: Install dependencies
run: yarn install

- name: Trigger EAS Android build (preview)
id: eas_build
run: eas build --platform android --profile preview --non-interactive
13 changes: 13 additions & 0 deletions eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@
"resourceClass": "m-medium"
},
"channel": "development"
},
"preview": {
"distribution": "internal",
"channel": "staging",
"ios": {
"resourceClass": "m-medium"
}
},
"production": {
"channel": "production",
"ios": {
"resourceClass": "m-medium"
}
}
}
}