|
| 1 | +name: Build iOS (Release) |
| 2 | + |
| 3 | +on: |
| 4 | + release: |
| 5 | + types: [published] |
| 6 | + pull_request: |
| 7 | + paths: |
| 8 | + - '.github/workflows/build-ios-release.yml' |
| 9 | + |
| 10 | +jobs: |
| 11 | + build_release: |
| 12 | + name: Build iOS Example App (release, new architecture) |
| 13 | + runs-on: macos-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v5 |
| 16 | + - uses: oven-sh/setup-bun@v2 |
| 17 | + |
| 18 | + - name: Install npm dependencies (bun) |
| 19 | + run: bun install |
| 20 | + - name: Install npm dependencies in example/ (bun) |
| 21 | + working-directory: example |
| 22 | + run: bun install |
| 23 | + |
| 24 | + - name: Setup Ruby (bundle) |
| 25 | + uses: ruby/setup-ruby@v1 |
| 26 | + with: |
| 27 | + ruby-version: 2.7.2 |
| 28 | + bundler-cache: true |
| 29 | + working-directory: example |
| 30 | + |
| 31 | + - name: Select Xcode 16.4 |
| 32 | + run: sudo xcode-select -s "/Applications/Xcode_16.4.app/Contents/Developer" |
| 33 | + |
| 34 | + - name: Restore Pods cache |
| 35 | + uses: actions/cache@v4 |
| 36 | + with: |
| 37 | + path: example/ios/Pods |
| 38 | + key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock', '**/Gemfile.lock') }} |
| 39 | + restore-keys: | |
| 40 | + ${{ runner.os }}-pods- |
| 41 | + - name: Install Pods |
| 42 | + working-directory: example |
| 43 | + run: bun pods |
| 44 | + |
| 45 | + - name: Build App (Release, Simulator) |
| 46 | + working-directory: example/ios |
| 47 | + run: | |
| 48 | + set -o pipefail |
| 49 | + xcodebuild \ |
| 50 | + CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \ |
| 51 | + -derivedDataPath build -UseModernBuildSystem=YES \ |
| 52 | + -workspace NitroImageExample.xcworkspace \ |
| 53 | + -scheme NitroImageExample \ |
| 54 | + -sdk iphonesimulator \ |
| 55 | + -configuration Release \ |
| 56 | + -destination 'generic/platform=iOS Simulator' \ |
| 57 | + build \ |
| 58 | + CODE_SIGNING_ALLOWED=NO |
| 59 | +
|
| 60 | + - name: Package .app for Simulator |
| 61 | + run: | |
| 62 | + cd example/ios/build/Build/Products/Release-iphonesimulator |
| 63 | + zip -r ../../../../../../NitroImageExample-Release-Simulator.zip NitroImageExample.app |
| 64 | +
|
| 65 | + - name: Upload .app to Release |
| 66 | + uses: actions/upload-release-asset@v1 |
| 67 | + env: |
| 68 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 69 | + with: |
| 70 | + upload_url: ${{ github.event.release.upload_url }} |
| 71 | + asset_path: NitroImageExample-Release-Simulator.zip |
| 72 | + asset_name: "NitroImageExample-Simulator-${{ github.event.release.tag_name }}.app.zip" |
| 73 | + asset_content_type: application/zip |
0 commit comments