Skip to content

Cloud Build (Deprecated) #28

Cloud Build (Deprecated)

Cloud Build (Deprecated) #28

Workflow file for this run

# You can use this to manually trigger a cloud build on Expo EAS
# However, Expo EAS builds have a limited quota, whereas we don't have a limit when running on Github actions.
# Since getting it to run on Github actions didn't end up being too hard, there's not too much point
# to this workflow anymore
name: Cloud Build (Deprecated)
on:
workflow_dispatch:
inputs:
platform:
type: choice
description: "Which mobile platforms to build"
required: true
default: "all"
options:
- android
- ios
- all
releaseStage:
type: choice
description: "type of release"
required: true
default: "alpha"
options:
- alpha
- beta
- release
jobs:
build-full-job:
name: Build application binaries
runs-on: ubuntu-latest
steps:
- name: Check for EXPO_TOKEN
run: |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions"
exit 1
fi
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.14.*
cache: yarn
cache-dependency-path: "**/yarn.lock"
- name: 1) [shared] Install dependencies
run: yarn --frozen-lockfile
working-directory: packages/shared/
- name: 1) [shared] Build
run: yarn build
working-directory: packages/shared/
- name: 2) [web] Install dependencies
# run: yarn --frozen-lockfile # TODO: --frozen-lockfile is erroring out, saying it must be updated. But it doesn't do that on my local machine. Why does it do that on the Github runner? Both seem to be using the same yarn version, 1.22.19
run: yarn
working-directory: packages/web/
- name: 2) [web] Build
run: yarn build
working-directory: packages/web/
- name: 3A) [mobile] Install dependencies
# run: yarn --frozen-lockfile # TODO: --frozen-lockfile is erroring out, saying it must be updated. But it doesn't do that on my local machine. Why does it do that on the Github runner? Both seem to be using the same yarn version, 1.22.19
run: yarn
working-directory: packages/mobile/
- name: 3A) [mobile] Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
# IF interested in trying local build: https://github.com/suiet/suiet/blob/63b50e4ba225b294af1018f3f98b9666738837c7/.github/workflows/build-app.yml#L9
- name: 3A) [mobile] EAS Cloud Build
run: eas build --platform ${{ github.event.inputs.platform }} --profile ${{ github.event.inputs.releaseStage }} --non-interactive --no-wait
working-directory: packages/mobile/
# - name: 3B) [electron] Install dependencies
# run: yarn --frozen-lockfile
# working-directory: ./packages/electron
# - name: 3B) [electron] Build
# run: yarn build
# working-directory: ./packages/electron
- name: 3B) [electron] Temporary Placeholder
run: echo "nothing to do"
working-directory: ./packages/electron