Skip to content

Commit 5076abe

Browse files
ci: pin Xcode version for CocoaPods publish jobs (#758)
* ci: pin Xcode version for CocoaPods publish jobs CocoaPods publish jobs ran on the macos-15 runner's default Xcode, which lacks the iOS 26 SDK. Dependencies like Airship use #available(iOS 26.0, *) guards — Swift still type-checks these blocks even on older toolchains, causing compile errors that don't reproduce locally on Xcode 26.2. Both publish jobs now select Xcode explicitly. The kit job reads xcode_version from the matrix entry (e.g. Braze uses 16.4), falling back to 26.2 when unset. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * ci: use macos-latest for CocoaPods publish jobs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent fc5fe53 commit 5076abe

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/release-publish.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,12 +312,17 @@ jobs:
312312
publish-core-cocoapods:
313313
name: Publish Core SDK to CocoaPods
314314
needs: [mirror-and-release-kits]
315-
runs-on: macos-15
315+
runs-on: macos-latest
316316
if: github.event.inputs.dry_run != 'true'
317+
env:
318+
XCODE_VERSION: "26.2"
317319
steps:
318320
- name: Checkout code
319321
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
320322

323+
- name: Select Xcode
324+
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
325+
321326
- name: Publish core podspecs
322327
env:
323328
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
@@ -332,8 +337,10 @@ jobs:
332337
publish-kit-cocoapods:
333338
name: Publish ${{ matrix.kit.name }} to CocoaPods
334339
needs: [load-matrix, publish-core-cocoapods]
335-
runs-on: macos-15
340+
runs-on: macos-latest
336341
if: github.event.inputs.dry_run != 'true'
342+
env:
343+
XCODE_VERSION: ${{ matrix.kit.xcode_version || '26.2' }}
337344
strategy:
338345
fail-fast: false
339346
matrix:
@@ -342,6 +349,9 @@ jobs:
342349
- name: Checkout code
343350
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
344351

352+
- name: Select Xcode
353+
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
354+
345355
- name: Wait for core SDK on CocoaPods CDN
346356
run: |
347357
VERSION=$(head -n 1 VERSION | tr -d '\r\n ')

0 commit comments

Comments
 (0)