Skip to content

Commit 3c03e2b

Browse files
cipolleschifacebook-github-bot
authored andcommitted
Add prepare prebuild reusable workflow (facebook#49530)
Summary: Pull Request resolved: facebook#49530 This change introduces the workflow to prebuild iOS artifacts. This will be a reusable workflow, so we can then call it as it is from test-all, nightlies and publish-release ## Changelog: [Internal] - Create prepare artifacts workflows Reviewed By: cortinico Differential Revision: D69854568 fbshipit-source-id: 5dc532fa564fe7e0987ba5d133da42e04237c3cc
1 parent 167a1a3 commit 3c03e2b

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/prebuild-ios.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
uses: actions/[email protected]
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

Comments
 (0)