Last active
September 28, 2023 17:54
-
-
Save foloinfo/58df77ecb1d46332d384188c63130338 to your computer and use it in GitHub Desktop.
eas ios build with circle CI setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2.1 | |
executors: | |
docker-node: | |
working_directory: ~/your_app | |
docker: | |
- image: cimg/node:16.17.1 | |
mac: | |
working_directory: ~/your_app | |
macos: | |
xcode: 14.0.0 | |
orbs: | |
node: circleci/[email protected] | |
commands: | |
install_node: | |
steps: | |
- node/install: | |
node-version: "16.17.1" | |
install-yarn: true | |
setup_yarn: | |
parameters: | |
cache_on: | |
default: docker | |
type: string | |
steps: | |
- restore_cache: | |
key: dependency-cache-{{ .Environment.CACHE_VERSION }}-<< parameters.cache_on >>-{{ checksum "yarn.lock" }} | |
- run: | |
name: Set yarn version | |
command: yarn set version 1.22.19 | |
- run: | |
name: Yarn Install | |
command: yarn install | |
- save_cache: | |
key: dependency-cache-{{ .Environment.CACHE_VERSION }}-<< parameters.cache_on >>-{{ checksum "yarn.lock" }} | |
paths: | |
- ./node_modules | |
setup_expo: | |
steps: | |
- run: | |
name: Install Expo | |
command: yarn global add expo-cli | |
- run: | |
name: Install EAS | |
command: yarn global add eas-cli | |
build_app: | |
parameters: | |
profile: | |
type: string | |
platform: | |
default: ios | |
type: string | |
steps: | |
- run: | |
name: Build Locally | |
command: > | |
APP_ENV=<< parameters.profile >> eas build --local | |
--non-interactive | |
--output=./app-build | |
--platform=<< parameters.platform >> | |
--profile=<< parameters.profile >> | |
expo_build: | |
parameters: | |
profile: | |
type: string | |
steps: | |
- checkout | |
- install_node | |
- setup_yarn: | |
cache_on: 'mac' | |
- setup_expo | |
- build_app: | |
profile: << parameters.profile >> | |
- store_artifacts: | |
path: ./app-build | |
jobs: | |
test: | |
executor: docker-node | |
steps: | |
- checkout | |
- setup_yarn | |
- run: | |
name: Run Tests | |
command: node ./node_modules/jest/bin/jest.js -w 2 | |
- store_artifacts: | |
path: coverage | |
expo_build_staging: | |
executor: mac | |
steps: | |
- expo_build: | |
profile: staging | |
expo_build_production: | |
executor: mac | |
steps: | |
- expo_build: | |
profile: production | |
workflows: | |
version: 2 | |
your_app: | |
jobs: | |
- test | |
- expo_build_staging: | |
filters: | |
branches: | |
only: build/ios/staging | |
- expo_build_production: | |
filters: | |
branches: | |
only: build/ios/production |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This
.circleci/config.yml
will run the jest specs when you push on any branch.The eas build will run when you pushed a branch named with
build/ios/staging
orbuild/ios/production
.I tried to cache resource from Xcode build but it didn't work.
If anyone know the better solution plz let me know.