Skip to content

Commit 3a34a72

Browse files
authored
Merge pull request #4 from cmcWebCode40/feature/mobile-pipleline-setup
Feature/mobile pipleline setup
2 parents 270c2fb + ca6463f commit 3a34a72

File tree

4 files changed

+126
-0
lines changed

4 files changed

+126
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build & Submit Production
2+
3+
on:
4+
pull_request:
5+
branches: [main] # Target branch is 'main'
6+
paths-ignore: ["docs/**"]
7+
types: [opened, reopened] # Avoid triggering on new commits
8+
9+
jobs:
10+
build:
11+
if: github.head_ref == 'dev' # Only run if PR is from 'dev'
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
18+
- name: Setup Node
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 18
22+
cache: yarn
23+
24+
- name: Setup EAS
25+
uses: expo/expo-github-action@v8
26+
with:
27+
eas-version: 16.1.0
28+
token: ${{ secrets.EAS_TOKEN }}
29+
30+
- name: Install dependencies
31+
run: yarn install
32+
33+
- name: Trigger Android Production Build
34+
run: eas build --platform android --profile production --non-interactive --no-wait
35+
36+
# - name: Trigger iOS Production Build
37+
# run: eas build --platform ios --profile production --non-interactive --no-wait
38+
39+
- name: Submit Android Build to Store
40+
run: eas submit --platform android --profile production --non-interactive
41+
42+
# - name: Submit iOS Build to Store
43+
# run: eas submit --platform ios --profile production --non-interactive

.github/workflows/ota-publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: OTA Publish to Production
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
types: [opened, reopened]
7+
jobs:
8+
publish-ota:
9+
if: startsWith(github.head_ref, 'ota/')
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
- name: Setup Node
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 18
20+
cache: yarn
21+
22+
- name: Setup EAS
23+
uses: expo/expo-github-action@v8
24+
with:
25+
eas-version: 16.1.0
26+
token: ${{ secrets.EAS_TOKEN }}
27+
28+
- name: Install dependencies
29+
run: yarn install
30+
31+
- name: Publish OTA to Production Channel
32+
run: eas update --channel production --platform android --non-interactive
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Preview Android Build (Feature Branch)
2+
3+
on:
4+
pull_request:
5+
branches: [dev]
6+
paths-ignore:
7+
- "**.md"
8+
- "docs/**"
9+
types: [opened, reopened]
10+
11+
jobs:
12+
build:
13+
name: Build Android Preview
14+
if: startsWith(github.head_ref, 'feature/')
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v3
20+
21+
- name: Setup Node
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: 18
25+
cache: yarn
26+
27+
- name: Setup EAS
28+
uses: expo/expo-github-action@v8
29+
with:
30+
eas-version: latest
31+
token: ${{ secrets.EAS_TOKEN }}
32+
33+
- name: Install dependencies
34+
run: yarn install
35+
36+
- name: Trigger EAS Android build (preview)
37+
id: eas_build
38+
run: eas build --platform android --profile preview --non-interactive

eas.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,19 @@
1010
"resourceClass": "m-medium"
1111
},
1212
"channel": "development"
13+
},
14+
"preview": {
15+
"distribution": "internal",
16+
"channel": "staging",
17+
"ios": {
18+
"resourceClass": "m-medium"
19+
}
20+
},
21+
"production": {
22+
"channel": "production",
23+
"ios": {
24+
"resourceClass": "m-medium"
25+
}
1326
}
1427
}
1528
}

0 commit comments

Comments
 (0)