From d52f674618e22eae7106d426936ead05191ec85e Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Tue, 29 Nov 2022 16:19:22 -0500 Subject: [PATCH] Add GH Action to run iOS build --- .github/workflows/build.yaml | 68 ++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 000000000..395cb6c47 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,68 @@ +name: Build app + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-ios: + name: Build iOS app + # if: github.event.pull_request.draft == false + runs-on: macos-12 + + steps: + - name: Check out Git repository + uses: actions/checkout@v3 + + # - name: Select Xcode version + # run: sudo xcode-select -s /Applications/Xcode_13.4.1.app + + - name: Set up Node.js + uses: actions/setup-node@v3.5.1 + with: + node-version: 14 + check-latest: true + cache: npm + + - name: Set up CocoaPods cache + uses: actions/cache@v3 + with: + path: ios/Pods + key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-pods- + + - name: Install Node.js dependencies + run: npm ci --no-audit + + - name: Run expo prebuild + run: npx expo-cli prebuild --clean --platform ios + + - name: Build app + run: | + cd ios + ls -Alh + xcodebuild archive \ + -workspace "Jellyfin.xcworkspace" \ + -scheme "Jellyfin" \ + -configuration Release \ + -archivePath build/Jellyfin.xcarchive \ + CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO + + - name: Build app archive + run: | + ls -Alh ios + cd ios/build + ls -Alh + ls -Alh Jellyfin.xcarchive + ls -Alh Jellyfin.xcarchive/Products + cp Jellyfin.xcarchive/Products/Applications ./Payload + zip -r Jellyfin.ipa Payload + + - name: Upload app archive + uses: actions/upload-artifact@v3 + with: + name: archive + path: ios/build/Jellyfin.ipa