From 98f8450669e3c05ef0fd05044082b0fd42df4289 Mon Sep 17 00:00:00 2001 From: Nikolai Wotton Date: Mon, 4 Aug 2025 22:41:33 -0400 Subject: [PATCH 01/10] progress --- .github/workflows/release.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7697ed1..870e4fb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ concurrency: ${{ github.workflow }} jobs: create_release: - runs-on: ubuntu-latest + runs-on: macos-15 if: github.event.pull_request.merged == true steps: @@ -23,6 +23,11 @@ jobs: - name: Setup bun uses: oven-sh/setup-bun@v2 + - name: Setup Xcode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: 16.2 + - name: Configure Git user run: | git config --global user.name "Candle Finance CI" @@ -34,6 +39,19 @@ jobs: - name: Install dependencies run: bun install + - name: Pods + working-directory: example + run: | + bun run prebuild --clean + # pod install is run as part of expo prebuild but the exit code appear to be swallowed so running it again in case it failed + cd ios + pod install + + - name: Xcode-build + working-directory: example + run: bun run build + timeout-minutes: 45 + - name: Release working-directory: . run: bun release-it --non-interactive From ae4d99ad1c96a08a0eadbbcdb0310500a9da95ed Mon Sep 17 00:00:00 2001 From: Nikolai Wotton Date: Mon, 4 Aug 2025 23:08:36 -0400 Subject: [PATCH 02/10] more progress --- .github/workflows/release.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 870e4fb..7d8c17b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,9 +47,24 @@ jobs: cd ios pod install + - name: Import Codesign Certs + uses: apple-actions/import-codesign-certs@v3 + with: + p12-file-base64: ${{ secrets.APPSTORE_CERTIFICATES_FILE_BASE64 }} + p12-password: ${{ secrets.APPSTORE_CERTIFICATES_PASSWORD }} + + - name: Download Provisioning Profiles + uses: apple-actions/download-provisioning-profiles@v4 + with: + bundle-id: "com.trycandle.candle" + profile-type: "IOS_APP_STORE" + issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }} + api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }} + api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }} + - name: Xcode-build working-directory: example - run: bun run build + run: bun run build --Release timeout-minutes: 45 - name: Release @@ -57,3 +72,13 @@ jobs: run: bun release-it --non-interactive env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload app to TestFlight + uses: apple-actions/upload-testflight-build@v3 + with: + app-path: "sdk-swift-example-app/.build/Artifacts/BasicExample.ipa" + issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }} + api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }} + api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }} + + # mode, scheme, destination, buildfolder, target, development team From 499ba84ac39744017dae5a19ae56c5bda7abb11d Mon Sep 17 00:00:00 2001 From: Nikolai Wotton Date: Mon, 4 Aug 2025 23:09:57 -0400 Subject: [PATCH 03/10] testing so far --- .github/workflows/release.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7d8c17b..4f8d8b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,8 +2,8 @@ name: Release on: pull_request: - types: - - closed + # types: + # - closed branches: - main @@ -64,7 +64,8 @@ jobs: - name: Xcode-build working-directory: example - run: bun run build --Release + # need to set: mode, scheme, destination, buildfolder, target, development team + run: bun run build timeout-minutes: 45 - name: Release @@ -80,5 +81,3 @@ jobs: issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }} api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }} api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }} - - # mode, scheme, destination, buildfolder, target, development team From 4615bf24153cad1d2cbf051b7571de8aef4c133c Mon Sep 17 00:00:00 2001 From: Nikolai Wotton Date: Mon, 4 Aug 2025 23:11:05 -0400 Subject: [PATCH 04/10] wtf --- .github/workflows/preview.yml | 1 + .github/workflows/test.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index c0a515d..1874f20 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -3,6 +3,7 @@ on: pull_request jobs: update: + if: github.event.pull_request.draft == false name: EAS Update runs-on: ubuntu-latest permissions: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e42aaef..885aeb2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,6 +9,7 @@ concurrency: ${{ github.workflow }} jobs: test: + if: github.event.pull_request.draft == false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} runs-on: macos-15 From 9362e7272d845781cd5472e149cf2bfba495e83c Mon Sep 17 00:00:00 2001 From: Nikolai Wotton Date: Mon, 4 Aug 2025 23:12:36 -0400 Subject: [PATCH 05/10] testing --- .github/workflows/release.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4f8d8b4..27a51c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ concurrency: ${{ github.workflow }} jobs: create_release: runs-on: macos-15 - if: github.event.pull_request.merged == true + # if: github.event.pull_request.merged == true steps: - name: Checkout repo @@ -68,11 +68,11 @@ jobs: run: bun run build timeout-minutes: 45 - - name: Release - working-directory: . - run: bun release-it --non-interactive - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: Release + # working-directory: . + # run: bun release-it --non-interactive + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload app to TestFlight uses: apple-actions/upload-testflight-build@v3 From 2500b4ad29116e6d6f236821408d462e9e03440e Mon Sep 17 00:00:00 2001 From: Nikolai Wotton Date: Mon, 4 Aug 2025 23:17:00 -0400 Subject: [PATCH 06/10] pods caching --- .github/workflows/release.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 27a51c4..12a860c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,6 +39,14 @@ jobs: - name: Install dependencies run: bun install + - name: Cache Cocoapods + uses: actions/cache@v4 + with: + path: ~/Library/Caches/CocoaPods + key: ${{ runner.os }}-pods-${{ hashFiles('example/ios/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-pods- + - name: Pods working-directory: example run: | From a46c744ea64762655833707a935a0e22a368099c Mon Sep 17 00:00:00 2001 From: Nikolai Wotton Date: Tue, 5 Aug 2025 16:34:40 -0400 Subject: [PATCH 07/10] testing it --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12a860c..169ab18 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,7 +64,7 @@ jobs: - name: Download Provisioning Profiles uses: apple-actions/download-provisioning-profiles@v4 with: - bundle-id: "com.trycandle.candle" + bundle-id: "fi.candle.example" profile-type: "IOS_APP_STORE" issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }} api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }} @@ -72,8 +72,8 @@ jobs: - name: Xcode-build working-directory: example - # need to set: mode, scheme, destination, buildfolder, target, development team - run: bun run build + # potentially need to set: mode, scheme, destination, buildfolder, target, development team + run: bun run build --mode Release --scheme CandleReactNative --buildFolder ./ios/.build --target CandleReactNative timeout-minutes: 45 # - name: Release From b8c9588e3dbb597cddfbc77298d258f65b7885e9 Mon Sep 17 00:00:00 2001 From: Nikolai Wotton Date: Tue, 5 Aug 2025 16:49:54 -0400 Subject: [PATCH 08/10] development team --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 169ab18..5c35672 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,7 +73,7 @@ jobs: - name: Xcode-build working-directory: example # potentially need to set: mode, scheme, destination, buildfolder, target, development team - run: bun run build --mode Release --scheme CandleReactNative --buildFolder ./ios/.build --target CandleReactNative + run: bun run build --mode Release --scheme CandleReactNative --buildFolder ./ios/.build --target CandleReactNative --development-team FW8BZ57ZU9 timeout-minutes: 45 # - name: Release From cb7509749f338e956e4b6c31e2ea94fcc41a9172 Mon Sep 17 00:00:00 2001 From: Nikolai Wotton Date: Tue, 5 Aug 2025 16:57:29 -0400 Subject: [PATCH 09/10] trying xcodebuild --- .github/workflows/release.yml | 26 +++++++++++++++++++++++--- example/exportOptions.plist | 13 +++++++++++++ 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 example/exportOptions.plist diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c35672..726271b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,12 +70,32 @@ jobs: api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }} api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }} - - name: Xcode-build + # - name: Xcode-build + # working-directory: example + # # potentially need to set: mode, scheme, destination, buildfolder, target, development team + # run: bun run build --mode Release --scheme CandleReactNative --buildFolder ./ios/.build --target CandleReactNative --development-team FW8BZ57ZU9 + # timeout-minutes: 45 + + - name: Build Release .xcarchive working-directory: example - # potentially need to set: mode, scheme, destination, buildfolder, target, development team - run: bun run build --mode Release --scheme CandleReactNative --buildFolder ./ios/.build --target CandleReactNative --development-team FW8BZ57ZU9 + run: | + xcodebuild \ + -workspace ios/CandleReactNative.xcworkspace \ + -scheme CandleReactNative \ + -configuration Release \ + -sdk iphoneos \ + -archivePath ios/build/CandleReactNative.xcarchive \ + clean archive \ + DEVELOPMENT_TEAM=FW8BZ57ZU9 timeout-minutes: 45 + - name: Export .ipa + run: | + xcodebuild -exportArchive \ + -archivePath ios/build/CandleReactNative.xcarchive \ + -exportPath ios/build/exported \ + -exportOptionsPlist exportOptions.plist + # - name: Release # working-directory: . # run: bun release-it --non-interactive diff --git a/example/exportOptions.plist b/example/exportOptions.plist new file mode 100644 index 0000000..6409615 --- /dev/null +++ b/example/exportOptions.plist @@ -0,0 +1,13 @@ + + + + + method + app-store + signingStyle + automatic + compileBitcode + + + From c60f4ce88f1cbb05186771cc57734cbbf3e257ae Mon Sep 17 00:00:00 2001 From: Nikolai Wotton Date: Tue, 5 Aug 2025 17:06:58 -0400 Subject: [PATCH 10/10] just bun ios apparently --- .github/workflows/release.yml | 41 ++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 726271b..7bf6614 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -76,25 +76,25 @@ jobs: # run: bun run build --mode Release --scheme CandleReactNative --buildFolder ./ios/.build --target CandleReactNative --development-team FW8BZ57ZU9 # timeout-minutes: 45 - - name: Build Release .xcarchive - working-directory: example - run: | - xcodebuild \ - -workspace ios/CandleReactNative.xcworkspace \ - -scheme CandleReactNative \ - -configuration Release \ - -sdk iphoneos \ - -archivePath ios/build/CandleReactNative.xcarchive \ - clean archive \ - DEVELOPMENT_TEAM=FW8BZ57ZU9 - timeout-minutes: 45 + # - name: Build Release .xcarchive + # working-directory: example + # run: | + # xcodebuild \ + # -workspace ios/CandleReactNative.xcworkspace \ + # -scheme CandleReactNative \ + # -configuration Release \ + # -sdk iphoneos \ + # -archivePath ios/build/CandleReactNative.xcarchive \ + # clean archive \ + # DEVELOPMENT_TEAM=FW8BZ57ZU9 + # timeout-minutes: 45 - - name: Export .ipa - run: | - xcodebuild -exportArchive \ - -archivePath ios/build/CandleReactNative.xcarchive \ - -exportPath ios/build/exported \ - -exportOptionsPlist exportOptions.plist + # - name: Export .ipa + # run: | + # xcodebuild -exportArchive \ + # -archivePath ios/build/CandleReactNative.xcarchive \ + # -exportPath ios/build/exported \ + # -exportOptionsPlist exportOptions.plist # - name: Release # working-directory: . @@ -102,6 +102,11 @@ jobs: # env: # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Xcode-build + working-directory: example + run: bun ios + timeout-minutes: 45 + - name: Upload app to TestFlight uses: apple-actions/upload-testflight-build@v3 with: