Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fastlane for iOS #639

Closed
wants to merge 64 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
9d55289
Initial fastlane integration
BPerlakiH Jan 27, 2024
8d13f0b
Locally working dev builds
BPerlakiH Jan 27, 2024
ea2b4a1
Update fastlane
BPerlakiH Jan 27, 2024
966a708
Update CI fastlane
BPerlakiH Jan 27, 2024
e98a59a
Use chekout of cert repo
BPerlakiH Jan 27, 2024
d34b1e8
Get provisioning profile on CI
BPerlakiH Jan 27, 2024
5028337
Remove steps
BPerlakiH Jan 27, 2024
3f2a99e
Remove provisioning step
BPerlakiH Jan 27, 2024
f0e0c75
Remove CI setup
BPerlakiH Jan 28, 2024
b8da691
Fix xcode select
BPerlakiH Jan 28, 2024
77fa884
Fix path
BPerlakiH Jan 28, 2024
5c118e9
Update profile selection
BPerlakiH Jan 28, 2024
9b0eb19
Update profile selection
BPerlakiH Jan 28, 2024
cafe51f
Revert
BPerlakiH Jan 28, 2024
27faf93
Move xcode select to fastlane
BPerlakiH Jan 28, 2024
6406395
Add teamid
BPerlakiH Jan 28, 2024
6f8717f
Remove setup ci
BPerlakiH Jan 28, 2024
f1e043f
Use imported cert
BPerlakiH Jan 28, 2024
816594d
Create keychain
BPerlakiH Jan 28, 2024
5b0489d
Add allowProvisioningUpdates
BPerlakiH Jan 28, 2024
28ef004
Separate build with no sign
BPerlakiH Jan 28, 2024
0fdd6c8
Try AppStore build
BPerlakiH Jan 28, 2024
68682f2
Try to manually unlock keychain
BPerlakiH Jan 28, 2024
1039343
Try app store creds
BPerlakiH Jan 28, 2024
17ea427
Try auto-sign
BPerlakiH Jan 28, 2024
dd73b7b
Enforce manual signing
BPerlakiH Jan 28, 2024
d13579c
Define profile
BPerlakiH Jan 28, 2024
57ef778
Use auto codesign
BPerlakiH Jan 28, 2024
acd01b9
Change lane name
BPerlakiH Jan 28, 2024
90fdf41
Remove match cert specification
BPerlakiH Jan 28, 2024
360172c
Move allowProvisioningUpdates
BPerlakiH Jan 28, 2024
9e69e15
Use xcargs
BPerlakiH Jan 28, 2024
1b9f23f
Switch to gym
BPerlakiH Jan 28, 2024
eadfed8
Try manual signing with allowProvisioningUpdates
BPerlakiH Jan 29, 2024
aef6102
Match get both dev and appstore certs
BPerlakiH Jan 29, 2024
f88a051
Use gym
BPerlakiH Jan 29, 2024
6b23ef1
Skip xcode detection for profile, use only app-store profile
BPerlakiH Jan 30, 2024
8e2902b
Update codesigning of the project
BPerlakiH Jan 30, 2024
9688efb
Add both certs
BPerlakiH Jan 30, 2024
05924b4
Force code sign identity
BPerlakiH Jan 30, 2024
1e071b9
Try with profile detection off
BPerlakiH Jan 30, 2024
a9b0554
Use existing deployment cert
BPerlakiH Jan 30, 2024
895e0c0
Use auto-sign
BPerlakiH Jan 30, 2024
9cf6f64
Use Apple Development for code signing
BPerlakiH Jan 31, 2024
5b131fc
Include dev profile as well
BPerlakiH Jan 31, 2024
f16a427
With less config
BPerlakiH Jan 31, 2024
9e055cd
Update bash
BPerlakiH Jan 31, 2024
8da558d
Unlock keychain in fastlane
BPerlakiH Feb 1, 2024
38f489c
use the external keychain
BPerlakiH Feb 1, 2024
c61c890
Reverse the order
BPerlakiH Feb 1, 2024
846a1bf
Install both dev and distr certs
BPerlakiH Feb 1, 2024
3a955f7
Inline xcodebuild arguments
BPerlakiH Feb 1, 2024
aca24a9
Clean up
BPerlakiH Feb 1, 2024
b88925e
Try without certs
BPerlakiH Feb 1, 2024
fd8bf59
Add only the dev cert
BPerlakiH Feb 1, 2024
bd66a82
Use match dev cert
BPerlakiH Feb 1, 2024
174d17b
Set match password
BPerlakiH Feb 1, 2024
7d3e189
Fix password
BPerlakiH Feb 1, 2024
2347762
Try with both match certs
BPerlakiH Feb 1, 2024
a659b23
Revert "Try with both match certs"
BPerlakiH Feb 1, 2024
fe99fd8
Revert "Fix password"
BPerlakiH Feb 1, 2024
813b9ec
Revert "Set match password"
BPerlakiH Feb 1, 2024
daec656
Revert "Use match dev cert"
BPerlakiH Feb 1, 2024
2d40f75
Try with get_certificates
BPerlakiH Feb 2, 2024
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
74 changes: 74 additions & 0 deletions .github/workflows/fastlane.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: FASTLANE_CI

on:
# push:
# branches: [ "main" ]
pull_request:
# branches: [ "main" ]

env:
APPLE_STORE_AUTH_KEY_PATH: /tmp/authkey.p8
KEYCHAIN: /Users/runner/build.keychain-db
KEYCHAIN_PASSWORD: mysecretpassword

workflow_dispatch:
jobs:
authorize:
# sets environment based on origin of PR: internal (non-existent) for own-repo or external (requires reviewer to run) for external repos
environment: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
runs-on: ubuntu-22.04
steps:
- run: true
build:
needs: authorize
runs-on: macos-13

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# /!\ important: this checks out code from the HEAD of the PR instead of the main branch (for pull_request_target)
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Create Keychain
shell: bash
env:
KEYCHAIN: ${{ env.KEYCHAIN }}
KEYCHAIN_PASSWORD: ${{ env.KEYCHAIN_PASSWORD }}
run: |
security create-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN
security default-keychain -s $KEYCHAIN
security set-keychain-settings $KEYCHAIN
security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN

- name: Add Apple Development certificate to Keychain
uses: ./.github/actions/install-cert
with:
SIGNING_CERTIFICATE: ${{ secrets.APPLE_DEVELOPMENT_SIGNING_CERTIFICATE }}
SIGNING_CERTIFICATE_P12_PASSWORD: ${{ secrets.APPLE_DEVELOPMENT_SIGNING_P12_PASSWORD }}
KEYCHAIN: ${{ env.KEYCHAIN }}
KEYCHAIN_PASSWORD: ${{ env.KEYCHAIN_PASSWORD }}

- name: Add Apple Store Key
env:
APPLE_STORE_AUTH_KEY_PATH: ${{ env.APPLE_STORE_AUTH_KEY_PATH }}
APPLE_STORE_AUTH_KEY: ${{ secrets.APPLE_STORE_AUTH_KEY }}
shell: bash
run: echo "${APPLE_STORE_AUTH_KEY}" | base64 --decode -o $APPLE_STORE_AUTH_KEY_PATH

- name: Download dependencies
run:
|
brew bundle
bundle update

- name: Build iOS Kiwix app with Fastlane
env:
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APPLE_STORE_AUTH_KEY_ID }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APPLE_STORE_AUTH_KEY_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_KEY_FILEPATH: ${{ env.APPLE_STORE_AUTH_KEY_PATH }}
KEYCHAIN_PASSWORD: ${{ env.KEYCHAIN_PASSWORD }}
shell: bash
run:
|
bundle exec fastlane ios build
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,8 @@ xcuserdata
Libraries

# ignore xcode project files, they are now generated by XcodeGen
*.xcodeproj
*.xcodeproj
# SPM package resolved:
**/Package.resolved
# fastlane builds:
builds
39 changes: 39 additions & 0 deletions Brewfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,45 @@
}
}
}
},
"fastlane": {
"version": "2.217.0",
"bottle": {
"rebuild": 1,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_sonoma": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/fastlane/blobs/sha256:91af5f1200f28c3373e0c42829179cefe1996f454c635f30ca2cbff451915f6a",
"sha256": "91af5f1200f28c3373e0c42829179cefe1996f454c635f30ca2cbff451915f6a"
},
"arm64_ventura": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/fastlane/blobs/sha256:7fa76937d5e469bcbcdd938547a290523a442650453bc45d1c6e5d96ee5d2687",
"sha256": "7fa76937d5e469bcbcdd938547a290523a442650453bc45d1c6e5d96ee5d2687"
},
"arm64_monterey": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/fastlane/blobs/sha256:b4c88dd9c23442eb89f9e793fced96a0d7aa37fcfbea4165c5fcc216d310d875",
"sha256": "b4c88dd9c23442eb89f9e793fced96a0d7aa37fcfbea4165c5fcc216d310d875"
},
"ventura": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/fastlane/blobs/sha256:3c60d7d5471d5b4bc25aa940c62b5b8fa082556cf6faea3ff018e9771d1977f5",
"sha256": "3c60d7d5471d5b4bc25aa940c62b5b8fa082556cf6faea3ff018e9771d1977f5"
},
"monterey": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/fastlane/blobs/sha256:7bd2b50d0320ae8c8ae226fc96803469411065629caa8e9aef99d14b4f01bfaa",
"sha256": "7bd2b50d0320ae8c8ae226fc96803469411065629caa8e9aef99d14b4f01bfaa"
},
"x86_64_linux": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/fastlane/blobs/sha256:669a63bf74a8000322f6191d49d6349a144d45122718ce0062dbcd7af58cb115",
"sha256": "669a63bf74a8000322f6191d49d6349a144d45122718ce0062dbcd7af58cb115"
}
}
}
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"

gem "fastlane"
214 changes: 214 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.6)
rexml
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.877.0)
aws-sdk-core (3.190.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.75.0)
aws-sdk-core (~> 3, >= 3.188.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.142.0)
aws-sdk-core (~> 3, >= 3.189.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sigv4 (1.8.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.1.0)
colored (1.2)
colored2 (3.1.2)
commander (4.6.0)
highline (~> 2.0.0)
declarative (0.0.20)
digest-crc (0.6.5)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.6.20231109)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.109.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.3.0)
fastlane (2.219.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander (~> 4.6)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-env (>= 1.6.0, < 2.0.0)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
http-cookie (~> 1.0.5)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (>= 2.0.0, < 3.0.0)
naturally (~> 2.2)
optparse (>= 0.1.1)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (~> 3)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.54.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.11.2)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-iamcredentials_v1 (0.17.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.13.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.29.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.6.1)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.1)
google-cloud-storage (1.45.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.29.0)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (1.8.1)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.5)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
json (2.7.1)
jwt (2.7.1)
mini_magick (4.12.0)
mini_mime (1.1.5)
multi_json (1.15.0)
multipart-post (2.3.0)
nanaimo (0.3.0)
naturally (2.2.1)
optparse (0.4.0)
os (1.1.4)
plist (3.7.1)
public_suffix (5.0.4)
rake (13.1.0)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.6)
rouge (2.0.7)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.3)
signet (0.18.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.10)
CFPropertyList
naturally
terminal-notifier (2.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
trailblazer-option (0.1.2)
tty-cursor (0.7.1)
tty-screen (0.8.2)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unicode-display_width (2.5.0)
webrick (1.8.1)
word_wrap (1.0.0)
xcodeproj (1.23.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)

PLATFORMS
arm64-darwin-22

DEPENDENCIES
fastlane

BUNDLED WITH
2.3.13
7 changes: 7 additions & 0 deletions fastlane/Appfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env ruby
# For more information about the Appfile, see:
# https://docs.fastlane.tools/advanced/#appfile

team_name "Wikimedia CH"
team_id "L7HWM3SP3L"
app_identifier "self.Kiwix"
Loading
Loading