Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on: pull_request

jobs:
update:
if: github.event.pull_request.draft == false
name: EAS Update
runs-on: ubuntu-latest
permissions:
Expand Down
93 changes: 84 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ name: Release

on:
pull_request:
types:
- closed
# types:
# - closed
branches:
- main

concurrency: ${{ github.workflow }}

jobs:
create_release:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
runs-on: macos-15
# if: github.event.pull_request.merged == true

steps:
- name: Checkout repo
Expand All @@ -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"
Expand All @@ -34,8 +39,78 @@ jobs:
- name: Install dependencies
run: bun install

- name: Release
working-directory: .
run: bun release-it --non-interactive
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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: |
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: 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: "fi.candle.example"
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
# # 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
# 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
# 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:
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 }}
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions example/exportOptions.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store</string>
<key>signingStyle</key>
<string>automatic</string>
<key>compileBitcode</key>
<true/>
</dict>
</plist>
Loading