-
Notifications
You must be signed in to change notification settings - Fork 3
71 lines (59 loc) · 2.56 KB
/
Copy pathmobile_eas_build.yaml
File metadata and controls
71 lines (59 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Mobile EAS Build
on:
pull_request:
types: [labeled]
permissions:
contents: read
pull-requests: write
jobs:
build:
if: ${{ github.event.label.name == 'eas build' }}
runs-on: macOS-latest
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: 🏗 Setup Node
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: npm
- name: 🏗 Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Use corepack
run: corepack enable
- name: 📦 Install dependencies
run: yarn && yarn build
- name: 🚀 Build app
run: eas build --non-interactive --platform=all --profile production
working-directory: examples/mobile-client/fishjam-chat
- name: 🛫 Submit iOS app to TestFlight
run: eas submit --non-interactive --platform=ios --latest
working-directory: examples/mobile-client/fishjam-chat
- name: ⛓️💥 Get iOS archive url and version
id: ios_build
run: eas build:list --json --non-interactive | jq -r '[.[] | select(.platform=="IOS")][0] | "version=\(.appVersion) (\(.appBuildVersion))"' >> $GITHUB_OUTPUT
working-directory: examples/mobile-client/fishjam-chat
- name: ⛓️💥 Get Android archive url and version
id: android_build
run: eas build:list --json --non-interactive | jq -r '[.[] | select(.platform=="ANDROID")][0] | "url=\(.artifacts.applicationArchiveUrl)\nversion=\(.appVersion) (\(.appBuildVersion))"' >> $GITHUB_OUTPUT
working-directory: examples/mobile-client/fishjam-chat
- name: 📱 Get App Store Connect app ID
id: asc_app
run: echo "id=$(jq -r '.submit.production.ios.ascAppId' eas.json)" >> $GITHUB_OUTPUT
working-directory: examples/mobile-client/fishjam-chat
- name: 💬 Add comment with build links
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '**Download links**\nAndroid - ${{ steps.android_build.outputs.version }}: ${{ steps.android_build.outputs.url }}\niOS - ${{ steps.ios_build.outputs.version }}: https://testflight.apple.com/v1/app/${{ steps.asc_app.outputs.id }}'
})