Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/mobile_eas_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Mobile EAS Build
on:
pull_request:
types: [labeled]
Comment thread
MiloszFilimowski marked this conversation as resolved.

permissions:
contents: read
pull-requests: write

jobs:
build:
if: ${{ github.event.label.name == 'eas build' }}
Comment thread
MiloszFilimowski marked this conversation as resolved.
runs-on: macOS-latest
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v4

- name: 🏗 Setup Node
uses: actions/setup-node@v4
with:
node-version: 22.x
Comment thread
MiloszFilimowski marked this conversation as resolved.
Comment thread
MiloszFilimowski marked this conversation as resolved.
cache: npm
Comment thread
MiloszFilimowski marked this conversation as resolved.

- 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

Comment thread
MiloszFilimowski marked this conversation as resolved.
- name: 🛫 Submit iOS app to TestFlight
run: eas submit --non-interactive --platform=ios --latest
working-directory: examples/mobile-client/fishjam-chat
Comment thread
MiloszFilimowski marked this conversation as resolved.

- 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
Comment thread
MiloszFilimowski marked this conversation as resolved.
Comment thread
MiloszFilimowski marked this conversation as resolved.
working-directory: examples/mobile-client/fishjam-chat
Comment thread
MiloszFilimowski marked this conversation as resolved.

- 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 }}'
})
Comment thread
MiloszFilimowski marked this conversation as resolved.
32 changes: 28 additions & 4 deletions examples/mobile-client/fishjam-chat/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
"newArchEnabled": true,
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.anonymous.fishjamchat",
"bundleIdentifier": "io.fishjam.example.fishjamchat",
Comment thread
MiloszFilimowski marked this conversation as resolved.
"infoPlist": {
"NSCameraUsageDescription": "Allow $(PRODUCT_NAME) to access your camera.",
"NSMicrophoneUsageDescription": "Allow $(PRODUCT_NAME) to access your microphone."
"NSMicrophoneUsageDescription": "Allow $(PRODUCT_NAME) to access your microphone.",
"ITSAppUsesNonExemptEncryption": false
},
"appleTeamId": "J5FM626PE2"
},
Expand All @@ -37,7 +38,7 @@
"android.permission.FOREGROUND_SERVICE_MICROPHONE",
"android.permission.POST_NOTIFICATIONS"
],
"package": "com.anonymous.fishjamchat"
"package": "io.fishjam.example.fishjamchat"
Comment thread
MiloszFilimowski marked this conversation as resolved.
},
"web": {
"output": "static",
Expand Down Expand Up @@ -75,6 +76,29 @@
],
"experiments": {
"typedRoutes": true
}
},
"extra": {
"eas": {
"projectId": "3cb3251a-603a-4c13-ab69-6fac3249072d",
"build": {
"experimental": {
"ios": {
"appExtensions": [
{
"targetName": "ScreenBroadcastExtension",
"bundleIdentifier": "io.fishjam.example.fishjamchat.ScreenBroadcastExtension",
"entitlements": {
"com.apple.security.application-groups": [
"group.io.fishjam.example.fishjamchat"
]
}
}
]
}
}
}
}
},
"owner": "fishjam-cloud"
}
}
36 changes: 36 additions & 0 deletions examples/mobile-client/fishjam-chat/eas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"cli": {
"version": ">= 12.5.3",
"appVersionSource": "remote"
},
"build": {
"base": {
"ios": {
"image": "latest"
Comment thread
MiloszFilimowski marked this conversation as resolved.
}
},
"development": {
"extends": "base",
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"extends": "base",
"distribution": "internal"
},
"production": {
"extends": "base",
"autoIncrement": true,
"android": {
"buildType": "apk"
}
}
},
"submit": {
"production": {
"ios": {
"ascAppId": "6711353226"
}
}
}
}
4 changes: 3 additions & 1 deletion examples/mobile-client/fishjam-chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"lint": "expo lint"
"lint": "expo lint",
"eas-build-pre-install": "corepack enable && yarn && (cd ../../.. && yarn build)",
Comment thread
MiloszFilimowski marked this conversation as resolved.
"prebuild": "rm -rf android/app/build && expo prebuild"
Comment thread
MiloszFilimowski marked this conversation as resolved.
},
"dependencies": {
"@expo/vector-icons": "^15.0.3",
Expand Down
Loading