Skip to content

Commit 51a676f

Browse files
committed
Fix Mac Catalyst framework symlinks in published iOS prebuilds
1 parent 3f54cc2 commit 51a676f

2 files changed

Lines changed: 26 additions & 6 deletions

File tree

‎.github/workflows/prebuild-ios-core.yml‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,15 @@ jobs:
102102
with:
103103
name: prebuild-ios-core-headers-${{ matrix.flavor }}-${{ matrix.slice }}
104104
path: packages/react-native/.build/headers
105+
- name: Compress slice to preserve symlinks
106+
run: |
107+
tar -czf "$RUNNER_TEMP/prebuild-ios-core-slice-${{ matrix.flavor }}-${{ matrix.slice }}.tar.gz" \
108+
-C packages/react-native/.build/output/spm/${{ matrix.flavor }}/Build/Products .
105109
- name: Upload artifacts
106110
uses: ./.github/actions/upload-artifact
107111
with:
108112
name: prebuild-ios-core-slice-${{ matrix.flavor }}-${{ matrix.slice }}
109-
path: |
110-
packages/react-native/.build/output/spm/${{ matrix.flavor }}/Build/Products
113+
path: ${{ runner.temp }}/prebuild-ios-core-slice-${{ matrix.flavor }}-${{ matrix.slice }}.tar.gz
111114
- name: Save Cache
112115
uses: actions/cache/save@v5
113116
if: ${{ github.ref == 'refs/heads/main' && inputs.version-type == '' && steps.restore-ios-slice.outputs.cache-hit != 'true' }}
@@ -166,8 +169,15 @@ jobs:
166169
uses: ./.github/actions/download-artifact
167170
with:
168171
pattern: prebuild-ios-core-slice-${{ matrix.flavor }}-*
169-
path: packages/react-native/.build/output/spm/${{ matrix.flavor }}/Build/Products
172+
path: ${{ runner.temp }}/prebuild-slices
170173
merge-multiple: true
174+
- name: Extract slices
175+
if: steps.restore-ios-xcframework.outputs.cache-hit != 'true'
176+
run: |
177+
mkdir -p packages/react-native/.build/output/spm/${{ matrix.flavor }}/Build/Products
178+
for archive in "$RUNNER_TEMP"/prebuild-slices/*.tar.gz; do
179+
tar -xzf "$archive" -C packages/react-native/.build/output/spm/${{ matrix.flavor }}/Build/Products
180+
done
171181
- name: Download headers
172182
if: steps.restore-ios-xcframework.outputs.cache-hit != 'true'
173183
uses: ./.github/actions/download-artifact

‎.github/workflows/prebuild-ios-dependencies.yml‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,15 @@ jobs:
9191
- name: Build slice ${{ matrix.slice }} for ${{ matrix.flavor }}
9292
if: steps.restore-slice-folder.outputs.cache-hit != 'true'
9393
run: node scripts/releases/prepare-ios-prebuilds.js -b -p ${{ matrix.slice }} -r ${{ matrix.flavor }}
94+
- name: Compress slice to preserve symlinks
95+
run: |
96+
tar -czf "$RUNNER_TEMP/prebuild-slice-${{ matrix.flavor }}-${{ matrix.slice }}.tar.gz" \
97+
-C packages/react-native/third-party/.build/Build/Products .
9498
- name: Upload Artifacts
9599
uses: ./.github/actions/upload-artifact
96100
with:
97101
name: prebuild-slice-${{ matrix.flavor }}-${{ matrix.slice }}
98-
path: |
99-
packages/react-native/third-party/.build/Build/Products
102+
path: ${{ runner.temp }}/prebuild-slice-${{ matrix.flavor }}-${{ matrix.slice }}.tar.gz
100103
- name: Save Cache
101104
uses: actions/cache/save@v5
102105
if: ${{ github.ref == 'refs/heads/main' && steps.restore-slice-folder.outputs.cache-hit != 'true' }}
@@ -147,8 +150,15 @@ jobs:
147150
uses: ./.github/actions/download-artifact
148151
with:
149152
pattern: prebuild-slice-${{ matrix.flavor }}-*
150-
path: packages/react-native/third-party/.build/Build/Products
153+
path: ${{ runner.temp }}/prebuild-slices
151154
merge-multiple: true
155+
- name: Extract slices
156+
if: steps.restore-xcframework.outputs.cache-hit != 'true'
157+
run: |
158+
mkdir -p packages/react-native/third-party/.build/Build/Products
159+
for archive in "$RUNNER_TEMP"/prebuild-slices/*.tar.gz; do
160+
tar -xzf "$archive" -C packages/react-native/third-party/.build/Build/Products
161+
done
152162
- name: Setup Keychain
153163
if: ${{ steps.restore-xcframework.outputs.cache-hit != 'true' && env.REACT_ORG_CODE_SIGNING_P12_CERT != '' }}
154164
uses: apple-actions/import-codesign-certs@v3 # https://github.com/marketplace/actions/import-code-signing-certificates

0 commit comments

Comments
 (0)