Skip to content

[FCE-715] Configure project for eas builds #12

[FCE-715] Configure project for eas builds

[FCE-715] Configure project for eas builds #12

Workflow file for this run

on:
pull_request:
types: [labeled]
jobs:
build:
if: ${{ github.event.label.name == 'eas build' }}
runs-on: macOS-latest
steps:
- name: πŸ— Setup repo
uses: actions/checkout@v3
- name: πŸ— Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
- name: πŸ— Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: πŸ“¦ Install dependencies
run: yarn && yarn build
# - name: πŸš€ Build app
# run: eas build --non-interactive --platform=all
# working-directory: examples/fishjam-chat
# - name: πŸ›« Submit iOS app to TestFlight
# run: eas submit --non-interactive --platform=ios --latest
# working-directory: examples/fishjam-chat
- name: πŸ—’οΈ Download EAS build list
id: eas_build_list
run: echo "list=$(eas build:list --json --non-interactive)" >> $GITHUB_OUTPUT
working-directory: examples/fishjam-chat
- name: πŸ”’ Get build version
id: build_version
run: ${{ steps.eas_build_list.outputs.list }} | jq -r '.[0] | "version=\(.appVersion) (\(.appBuildVersion))"' >> $GITHUB_OUTPUT
working-directory: examples/fishjam-chat
- name: ⛓️‍πŸ’₯ Get Android archive url
id: android_archive
run: ${{ steps.eas_build_list.outputs.list }} | jq -r '[.[] | select(.platform=="ANDROID")][0] | "url=\(.artifacts.applicationArchiveUrl)"' >> $GITHUB_OUTPUT
working-directory: examples/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 for build ${{ steps.build_version.outputs.version }}**\nAndroid: ${{ steps.android_archive.outputs.url }}\niOS: https://testflight.apple.com/v1/app/6711353226'
})