Skip to content

Commit af0111a

Browse files
committed
ci: Build iOS app with fastlane
Adds all the signing keys and other credentials required for a successful production build. Additionally, opens the door to deploying via CI.
1 parent 9a27316 commit af0111a

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

.github/workflows/ios.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "iOS"
2+
3+
on:
4+
push:
5+
branches: ["master", "ci"]
6+
7+
jobs:
8+
build:
9+
timeout-minutes: 20
10+
runs-on: macos-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Setup Java
14+
uses: actions/setup-java@v4
15+
with:
16+
distribution: temurin
17+
java-version: 17
18+
- name: Setup Ruby
19+
uses: ruby/setup-ruby@v1
20+
with:
21+
bundler-cache: true
22+
- name: Install dependencies
23+
run: |
24+
yarn install
25+
yarn pods
26+
- name: Build Application
27+
run: |
28+
echo $SECRETS_TAR_GZ_B64 | base64 -d | tar -xz -C fastlane
29+
bundle exec fastlane certificates_ci
30+
bundle exec fastlane ios build
31+
env:
32+
SECRETS_TAR_GZ_B64: ${{ secrets.SECRETS_TAR_GZ_B64 }}
33+
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}

fastlane/Fastfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@ platform :ios do
2424
match(type: 'development', keychain_password: ENV['MATCH_PASSWORD'])
2525
match(type: 'appstore', keychain_password: ENV['MATCH_PASSWORD'])
2626
end
27+
28+
desc 'Fetch certificates and provisioning profiles (for use in CI)'
29+
lane :certificates_ci do
30+
create_keychain(
31+
name: 'match-ci',
32+
password: ENV['MATCH_PASSWORD'],
33+
default_keychain: true,
34+
unlock: true,
35+
)
36+
match(type: 'appstore', keychain_password: ENV['MATCH_PASSWORD'])
37+
end
2738

2839
desc 'Build the iOS application.'
2940
lane :build do

0 commit comments

Comments
 (0)