Skip to content
Merged
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
105 changes: 105 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: CI

on:
pull_request:
branches: [ main, develop ]
push:
branches: [ main, develop ]

jobs:
test:
name: Run Tests
runs-on: macos-14

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.2'

- name: Install mise
uses: jdx/mise-action@v2

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true

- name: Cache Tuist
uses: actions/cache@v4
with:
path: |
~/.tuist/Cache
Tuist/.build
key: ${{ runner.os }}-tuist-${{ hashFiles('**/Project.swift') }}
restore-keys: |
${{ runner.os }}-tuist-

- name: Create APIInfos.swift
run: |
mkdir -p Data/Sources/Network/Secrets
echo "${{ secrets.API_INFOS_SWIFT }}" | base64 --decode > Data/Sources/Network/Secrets/APIInfos.swift

- name: Create GoogleService-Info.plist
run: |
mkdir -p Oreum/Resources
echo "${{ secrets.GOOGLE_SERVICE_INFO_PLIST }}" | base64 --decode > Oreum/Resources/GoogleService-Info.plist

- name: Run Tests
run: bundle exec fastlane test

- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: fastlane/test_output

build:
name: Build Verification
runs-on: macos-14

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.2'

- name: Install mise
uses: jdx/mise-action@v2

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true

- name: Cache Tuist
uses: actions/cache@v4
with:
path: |
~/.tuist/Cache
Tuist/.build
key: ${{ runner.os }}-tuist-${{ hashFiles('**/Project.swift') }}
restore-keys: |
${{ runner.os }}-tuist-

- name: Create APIInfos.swift
run: |
mkdir -p Data/Sources/Network/Secrets
echo "${{ secrets.API_INFOS_SWIFT }}" | base64 --decode > Data/Sources/Network/Secrets/APIInfos.swift

- name: Create GoogleService-Info.plist
run: |
mkdir -p Oreum/Resources
echo "${{ secrets.GOOGLE_SERVICE_INFO_PLIST }}" | base64 --decode > Oreum/Resources/GoogleService-Info.plist

- name: Build App
run: bundle exec fastlane build
95 changes: 95 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Deploy to TestFlight

on:
push:
branches: [ main ]
workflow_dispatch:

jobs:
deploy:
name: Deploy to TestFlight
runs-on: macos-14

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.2'

- name: Install mise
uses: jdx/mise-action@v2

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true

- name: Cache Tuist
uses: actions/cache@v4
with:
path: |
~/.tuist/Cache
Tuist/.build
key: ${{ runner.os }}-tuist-${{ hashFiles('**/Project.swift') }}
restore-keys: |
${{ runner.os }}-tuist-

- name: Create APIInfos.swift
run: |
mkdir -p Data/Sources/Network/Secrets
echo "${{ secrets.API_INFOS_SWIFT }}" | base64 --decode > Data/Sources/Network/Secrets/APIInfos.swift

- name: Create GoogleService-Info.plist
run: |
mkdir -p Oreum/Resources
echo "${{ secrets.GOOGLE_SERVICE_INFO_PLIST }}" | base64 --decode > Oreum/Resources/GoogleService-Info.plist

- name: Setup App Store Connect API Key
env:
APP_STORE_CONNECT_API_KEY_CONTENT: ${{ secrets.APP_STORE_CONNECT_API_KEY }}
run: |
mkdir -p ~/.appstoreconnect/private_keys
echo "$APP_STORE_CONNECT_API_KEY_CONTENT" | base64 --decode > ~/.appstoreconnect/private_keys/AuthKey_${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}.p8

- name: Import Certificates
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
# Create keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
security set-keychain-settings -t 3600 -u build.keychain

# Import certificate
echo "$BUILD_CERTIFICATE_BASE64" | base64 --decode > certificate.p12
security import certificate.p12 -k build.keychain -P "$P12_PASSWORD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain
rm certificate.p12

- name: Import Provisioning Profile
env:
PROVISIONING_PROFILE_BASE64: ${{ secrets.PROVISIONING_PROFILE_BASE64 }}
run: |
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
echo "$PROVISIONING_PROFILE_BASE64" | base64 --decode > ~/Library/MobileDevice/Provisioning\ Profiles/profile.mobileprovision

- name: Deploy to TestFlight
env:
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
APP_STORE_CONNECT_API_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_ISSUER_ID }}
run: bundle exec fastlane beta

- name: Clean up keychain
if: always()
run: |
security delete-keychain build.keychain || true
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,15 @@ Data/Resources/

### Firebase ###
GoogleService-Info.plist

### Fastlane ###
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/README.md

### Ruby ###
vendor/bundle
.bundle
Gemfile.lock
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.2.2
Loading