Skip to content

Commit

Permalink
create ios build github action
Browse files Browse the repository at this point in the history
  • Loading branch information
robertKozik committed Jan 19, 2024
1 parent ad45f00 commit 067d37f
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Test iOS build
on:
pull_request:
paths:
- .github/workflows/ios-build.yml
- Example/package.json
- Example/ios/**
merge_group:
branches:
- main
push:
# commented due to test purposes
# branches:
# - main
# paths:
# - .github/workflows/ios-build.yml
# - Example/package.json
# - Example/ios/**

jobs:
build_ios:
runs-on: macos-12
strategy:
matrix: {dir: [Example]}
steps:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Install app node_modules
working-directory: ${{ matrix.dir }}
run: yarn install --frozen-lockfile

- name: Restore Pods from cache
uses: actions/cache@v3
with:
path: |
${{ matrix.dir }}/ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-pods-${{ matrix.dir }}-${{ hashFiles(format('{0}/ios/Podfile.lock', matrix.dir)) }}

- name: Install Pods
working-directory: ${{ matrix.dir }}/ios
run: pod install

- name: Restore build artifacts from cache
uses: actions/cache@v3
with:
path: ~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-ios-derived-data-${{ matrix.dir }}-${{ hashFiles(format('{0}/ios/Podfile.lock', matrix.dir)) }}

- name: Build app
working-directory: ${{ matrix.dir }}
run: npx react-native run-ios

0 comments on commit 067d37f

Please sign in to comment.