Skip to content

Fixes actions and add setup to test upload flow #81

Fixes actions and add setup to test upload flow

Fixes actions and add setup to test upload flow #81

name: PR Ad-hoc Build for Yral-Staging (Firebase)
on:
pull_request:
branches:
- 'develop'
types:
- ready_for_review
- synchronize
jobs:
build-ad-hoc-staging:
if: ${{ github.event.pull_request.draft == false }}
runs-on: macos-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.1.0'
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: aarch64-apple-ios
override: true
- name: Install cargo-lipo
run: cargo install cargo-lipo
- name: Make build script executable
run: chmod +x iosApp/build-rust.sh
- name: Build Rust Library
run: |
PROJECT_DIR="${PWD}/rust-agent" iosApp/build-rust.sh
# Optional: verify the build
ls -la rust-agent/target || true
- name: Install Fastlane + Firebase plugin
run: |
gem install fastlane
gem install fastlane-plugin-firebase_app_distribution
- name: Clean Build Directory
run: |
xcodebuild clean -project iosApp/iosApp.xcodeproj -scheme iosAppStaging
rm -rf ~/Library/Developer/Xcode/DerivedData/*
- name: Decrypt and import Dev Certificate
run: |
mkdir -p certs
echo "${{ secrets.YRAL_STAGING_DEV_CERT_P12_BASE64 }}" | base64 --decode > certs/Yral-Staging-Development.p12
echo "${{ secrets.YRAL_STAGING_DEV_PROF_BASE64 }}" | base64 --decode > certs/Yral-Staging-Development.mobileprovision
# Create and configure keychain
security create-keychain -p "" build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p "" build.keychain
security set-keychain-settings -t 3600 -l ~/Library/Keychains/build.keychain
# Import certificate
security import certs/Yral-Staging-Development.p12 -k build.keychain -P "${{ secrets.IOS_CERTIFICATE_PASSWORD }}" -A
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "" build.keychain
# Install provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp certs/Yral-Staging-Development.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/
- name: Build & Distribute via Firebase
run: fastlane ios build_staging_firebase
env:
FIREBASE_APP_ID_STAGING: ${{ secrets.FIREBASE_APP_ID_STAGING }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}