Skip to content

Commit 41bb21b

Browse files
authored
ci: update pod repo and remove pod cache (#865)
1 parent ffca33d commit 41bb21b

File tree

3 files changed

+4
-45
lines changed

3 files changed

+4
-45
lines changed

.github/workflows/build-templates.yml

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -231,38 +231,15 @@ jobs:
231231
uses: maxim-lobanov/setup-xcode@v1
232232
with:
233233
xcode-version: ${{ env.XCODE_VERSION }}
234-
235-
- name: Restore cocoapods
236-
if: env.ios_build == 1 && env.turbo_cache_hit_ios != 1
237-
id: library-cocoapods-cache
238-
uses: actions/cache/restore@v4
239-
with:
240-
path: |
241-
${{ env.work_dir }}/**/ios/Pods
242-
${{ env.work_dir }}/**/ios/Podfile.lock
243-
key: ${{ runner.os }}-library-cocoapods-${{ hashFiles(format('{0}/example/ios/Podfile', env.work_dir)) }}-${{ hashFiles(format('{0}/yarn.lock', env.work_dir)) }}-${{ hashFiles(format('{0}/**/*ViewNativeComponent.ts', env.work_dir), format('{0}/**/Native*.ts', env.work_dir), format('{0}/**/*.nitro.ts', env.work_dir)) }}
244-
restore-keys: |
245-
${{ runner.os }}-library-cocoapods-${{ hashFiles(format('{0}/example/ios/Podfile', env.work_dir)) }}-${{ hashFiles(format('{0}/yarn.lock', env.work_dir)) }}-
246-
${{ runner.os }}-library-cocoapods-${{ hashFiles(format('{0}/example/ios/Podfile', env.work_dir)) }}-
247-
${{ runner.os }}-library-cocoapods-
248-
249234
- name: Install cocoapods
250-
if: env.ios_build == 1 && env.turbo_cache_hit_ios != 1 && steps.library-cocoapods-cache.outputs.cache-hit != 'true'
235+
if: env.ios_build == 1 && env.turbo_cache_hit_ios != 1
251236
working-directory: ${{ env.work_dir }}
252237
run: |
253238
cd example
254239
bundle install
240+
bundle exec pod repo update --verbose
255241
bundle exec pod install --project-directory=ios
256242
257-
- name: Cache cocoapods
258-
if: env.ios_build == 1 && env.turbo_cache_hit_ios != 1 && steps.library-cocoapods-cache.outputs.cache-hit != 'true'
259-
uses: actions/cache/save@v4
260-
with:
261-
path: |
262-
${{ env.work_dir }}/**/ios/Pods
263-
${{ env.work_dir }}/**/ios/Podfile.lock
264-
key: ${{ steps.library-cocoapods-cache.outputs.cache-primary-key }}
265-
266243
- name: Build example (iOS)
267244
if: env.ios_build == 1
268245
working-directory: ${{ env.work_dir }}

packages/create-react-native-library/templates/common/$.github/workflows/ci.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -151,32 +151,14 @@ jobs:
151151
with:
152152
xcode-version: ${{ env.XCODE_VERSION }}
153153

154-
- name: Restore cocoapods
155-
if: env.turbo_cache_hit != 1
156-
id: cocoapods-cache
157-
uses: actions/cache/restore@v4
158-
with:
159-
path: |
160-
**/ios/Pods
161-
key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }}
162-
restore-keys: |
163-
${{ runner.os }}-cocoapods-
164-
165154
- name: Install cocoapods
166155
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
167156
run: |
168157
cd example
169158
bundle install
159+
bundle exec pod repo update --verbose
170160
bundle exec pod install --project-directory=ios
171161
172-
- name: Cache cocoapods
173-
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
174-
uses: actions/cache/save@v4
175-
with:
176-
path: |
177-
**/ios/Pods
178-
key: ${{ steps.cocoapods-cache.outputs.cache-key }}
179-
180162
- name: Build example for iOS
181163
run: |
182164
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"

packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Pod::Spec.new do |s|
2424
2525
<% if (project.moduleConfig === "nitro-modules") { -%>
2626
s.source_files = [
27-
"ios/**/*.{swift}",=
27+
"ios/**/*.{swift}",
2828
"ios/**/*.{m,mm}",
2929
"cpp/**/*.{hpp,cpp}",
3030
]

0 commit comments

Comments
 (0)