Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jsubloom committed Sep 1, 2023
2 parents 3e63fed + 101c638 commit 477bb24
Show file tree
Hide file tree
Showing 4 changed files with 162 additions and 18 deletions.
32 changes: 29 additions & 3 deletions .github/workflows/build-full.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
name: build-full
on: workflow_dispatch
name: Cloud Build
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:
Expand Down Expand Up @@ -61,8 +81,14 @@ jobs:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Print Folder Structure
run: |
echo "Folder structure:"
tree -L 5 --dirsfirst
# 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 all --profile production --non-interactive --no-wait
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
Expand Down
110 changes: 110 additions & 0 deletions .github/workflows/build-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Local Build
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-local-job:
name: Build application binaries
runs-on: ubuntu-latest
#runs-on: macos-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.*
# ENHANCE: Not sure why caching errors out. It can't ever seem to find the path, no matter what I tried.
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/

# This gave an answer of 135,210 bytes.
# That's pretty close? I'm expecting 138,443
- name: Print Yarn Lock Size
run: |
yarn_lock_size=$(stat -c %s yarn.lock)
echo "Size of yarn.lock: $yarn_lock_size bytes"
working-directory: packages/web/

- 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 }}

- name: Print Folder Structure
run: |
echo "Folder structure:"
tree -L 5 --dirsfirst
# Inspired by: 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: Print Folder Structure
run: |
echo "Folder structure:"
tree -L 4 --dirsfirst
# TODO: Upload artifact if successful
# - 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
3 changes: 3 additions & 0 deletions packages/mobile/TODO.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
Change the status bar color
AppBar needs some padding - amount TBD

Android builds fail in beta and release - Looks like https://github.com/expo/expo/issues/23265. Does this workaround work? https://github.com/expo/expo/issues/23265#issuecomment-1662709655
Well, or if you just publish the packages to the NPM repository, that would solve it for the release case. For local builds, you can continue using yarn link, and we have a viable workaround in local development and alpha mode.
35 changes: 20 additions & 15 deletions packages/mobile/eas.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
// REFERENCE: https://docs.expo.dev/build-reference/eas-json/
{
"cli": {
"version": ">= 2.7.1",
"promptToConfigurePushNotifications": false
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
"cli": {
"version": ">= 2.7.1",
"promptToConfigurePushNotifications": false
},
"preview": {
"distribution": "internal"
"build": {
"alpha": {
"developmentClient": true,
"distribution": "internal",
"channel": "alpha"
},
"beta": {
"distribution": "internal",
"channel": "beta"
},
"release": {
"channel": "release"
}
},
"production": {}
},
"submit": {
"production": {}
}
"submit": {
"release": {}
}
}

0 comments on commit 477bb24

Please sign in to comment.