From aa76f1d0b91e5164d1af3fdaca2c29362f1e15a3 Mon Sep 17 00:00:00 2001 From: Arafat Zahan Date: Sun, 29 May 2022 07:13:30 +0600 Subject: [PATCH] feat: add ios workflow. --- .github/workflows/ios.yml | 85 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .github/workflows/ios.yml diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml new file mode 100644 index 0000000..57728e6 --- /dev/null +++ b/.github/workflows/ios.yml @@ -0,0 +1,85 @@ +name: IOS Build + +on: + push: + branches: + - master + paths: + - ".github/workflows/ios.yml" + - "**.js" + - "**.json" + - "**.ts" + - "**.tsx" + - "template/.eslint*" + - "template/.prettier*" + - "template/package.json" + - "template/tsconfig.json" + - "template/yarn.lock" + - "template/ios/**" + - "template/.bundle/**" + - "template/.ruby-version" + - "template/Gemfile" + - "template/Gemfile.lock" + - "template/Gemfile" + pull_request: + branches: + - master + paths: + - ".github/workflows/ios.yml" + - "**.js" + - "**.json" + - "**.ts" + - "**.tsx" + - "template/package.json" + - "template/yarn.lock" + - "template/ios/**" + - "template/.bundle/**" + - "template/.ruby-version" + - "template/Gemfile" + - "template/Gemfile.lock" + - "template/Gemfile" + types: + - opened + - reopened + - synchronize + +concurrency: + group: ios-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: IOS Build + runs-on: macOS-latest + timeout-minutes: 20 + defaults: + run: + working-directory: template + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version-file: "template/.nvmrc" + cache: "yarn" + cache-dependency-path: template/yarn.lock + - name: Setup Ruby (bundle) + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + working-directory: template + name: Pods cache + uses: actions/cache@v2 + with: + path: | + template/ios/Pods + ~/Library/Caches/CocoaPods + ~/.cocoapods + key: ${{ runner.os }}-pods-${{ hashFiles('template/ios/Podfile.lock') }} + - name: Install dependencies + run: yarn + - name: Install Pods + run: cd ios && pod install --repo-update && cd .. + - name: IOS Release Build + run: cd ios && xcodebuild -workspace HelloWorld.xcworkspace -configuration Release -scheme HelloWorld -destination 'platform=iOS Simulator,name=iPhone 13'