-
-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c260b90
commit 7db2827
Showing
2 changed files
with
75 additions
and
64 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Build ios | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-ios: | ||
name: Build | ||
runs-on: macos-13 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/cache@v3 | ||
id: cache | ||
with: | ||
path: | | ||
${{ env.APP_PATH }} | ||
${{ env.APP_PATH }}.dSYM | ||
key: ${{ runner.os }}-${{ hashFiles('src/**', 'ios/**', env.EXAMPLE_SRC ) }} | ||
|
||
- uses: actions/setup-node@v3 | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
with: | ||
node-version: 14.18.1 | ||
cache: 'yarn' | ||
|
||
- name: Install npm dependencies (example project) | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
working-directory: ./examples/${{ env.PROJECT_NAME }}/ | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Install npm dependencies (root) | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
working-directory: ./ | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Setup Ruby | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
working-directory: ./examples/${{ env.PROJECT_NAME }}/ | ||
|
||
- name: setup-cocoapods | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
uses: maxim-lobanov/setup-cocoapods@v1 | ||
with: | ||
version: 1.11.3 | ||
|
||
- name: Install CocoaPods | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
working-directory: ./examples/${{ env.PROJECT_NAME }}/ | ||
run: | | ||
yarn pods | ||
- name: Select Xcode | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: sudo xcode-select -s /Applications/Xcode_$(<.xcode-version).app/Contents/Developer | ||
|
||
- name: Build | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
working-directory: ./examples/${{ env.PROJECT_NAME }}/ios/ | ||
run: | | ||
set -o pipefail && xcodebuild \ | ||
-workspace "${{ env.PROJECT_NAME }}.xcworkspace" \ | ||
-scheme "${{ env.PROJECT_NAME }}" \ | ||
-destination "platform=iOS Simulator,name=iPhone 14,OS=16.4" \ | ||
-derivedDataPath "DerivedData" \ | ||
-configuration "Release" \ | ||
| tee xcodebuild.log |
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