Skip to content

Commit

Permalink
ci: Build iOS app with fastlane
Browse files Browse the repository at this point in the history
Adds all the signing keys and other credentials required for a
successful production build.

Additionally, opens the door to deploying via CI.
  • Loading branch information
thehale committed Jun 25, 2024
1 parent 9a27316 commit af0111a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "iOS"

on:
push:
branches: ["master", "ci"]

jobs:
build:
timeout-minutes: 20
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Install dependencies
run: |
yarn install
yarn pods
- name: Build Application
run: |
echo $SECRETS_TAR_GZ_B64 | base64 -d | tar -xz -C fastlane
bundle exec fastlane certificates_ci
bundle exec fastlane ios build
env:
SECRETS_TAR_GZ_B64: ${{ secrets.SECRETS_TAR_GZ_B64 }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
11 changes: 11 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ platform :ios do
match(type: 'development', keychain_password: ENV['MATCH_PASSWORD'])
match(type: 'appstore', keychain_password: ENV['MATCH_PASSWORD'])
end

desc 'Fetch certificates and provisioning profiles (for use in CI)'
lane :certificates_ci do
create_keychain(
name: 'match-ci',
password: ENV['MATCH_PASSWORD'],
default_keychain: true,
unlock: true,
)
match(type: 'appstore', keychain_password: ENV['MATCH_PASSWORD'])
end

desc 'Build the iOS application.'
lane :build do
Expand Down

0 comments on commit af0111a

Please sign in to comment.