|
| 1 | +name: Prebuild iOS |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: # this directive allow us to call this workflow from other workflows |
| 5 | + pull_request: # remove this before landing |
| 6 | + |
| 7 | +jobs: |
| 8 | + prepare_workspace: |
| 9 | + name: Prepare workspace |
| 10 | + runs-on: macos-14 |
| 11 | + steps: |
| 12 | + - name: Checkout |
| 13 | + uses: actions/checkout@v4 |
| 14 | + - name: Setup node.js |
| 15 | + uses: ./.github/actions/setup-node |
| 16 | + - name: Restore cache if present |
| 17 | + id: restore-ios-prebuilds |
| 18 | + uses: actions/cache/restore@v4 |
| 19 | + with: |
| 20 | + path: packages/react-native/third-party/ |
| 21 | + key: v1-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuilds/configuration.js') }} |
| 22 | + enableCrossOsArchive: true |
| 23 | + - name: Yarn Install |
| 24 | + if: steps.restore-ios-prebuilds.outputs.cache-hit != 'true' |
| 25 | + uses: ./.github/actions/yarn-install |
| 26 | + - name: Prepare Dependencies |
| 27 | + if: steps.restore-ios-prebuilds.outputs.cache-hit != 'true' |
| 28 | + run: | |
| 29 | + node scripts/releases/prepare-ios-prebuilds.js -s |
| 30 | + - name: Generate Package.swift |
| 31 | + if: steps.restore-ios-prebuilds.outputs.cache-hit != 'true' |
| 32 | + run: | |
| 33 | + node scripts/releases/prepare-ios-prebuilds.js -w |
| 34 | + - name: Upload Artifacts |
| 35 | + |
| 36 | + with: |
| 37 | + name: ios-prebuilds-workspace |
| 38 | + path: packages/react-native/third-party/ |
| 39 | + - name: Save Cache |
| 40 | + uses: actions/cache/save@v4 |
| 41 | + if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode |
| 42 | + with: |
| 43 | + key: v1-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuilds/configuration.js') }} |
| 44 | + enableCrossOsArchive: true |
| 45 | + path: packages/react-native/third-party/ |
0 commit comments