an open source Navidrome client written in Swift — https://dub.sh/getflo
1fastlane_version "2.225.0"
2default_platform(:ios)
3
4groups = ["Kepelet"]
5configuration = "Release"
6
7platform :ios do
8 desc "load App Store Connect API key"
9 lane :load_asc_api_key do
10 app_store_connect_api_key(
11 key_id: ENV["ASC_KEY_ID"],
12 issuer_id: ENV["ASC_ISSUER_ID"],
13 key_content: ENV["ASC_KEY_CONTENT"],
14 is_key_content_base64: false,
15 in_house: false
16 )
17 end
18
19 desc "sync certs thing"
20 lane :sync_certs do
21 api_key = lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
22
23 match({readonly: true, type: "appstore", api_key: api_key})
24 end
25
26 desc "bump build number based on latest TestFlight build number"
27 lane :fetch_and_increment_build_number do
28 app_identifier = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)
29 api_key = lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
30
31 latest_build_number = latest_testflight_build_number(
32 api_key: api_key,
33 version: get_version_number,
34 app_identifier: app_identifier
35 )
36
37 increment_build_number(build_number: (latest_build_number + 1))
38 end
39
40 desc "build app"
41 lane :build do
42 load_asc_api_key
43 sync_certs
44 fetch_and_increment_build_number
45 build_app(configuration: configuration)
46 end
47
48 desc "push a new build to TestFlight"
49 lane :beta do |options|
50 is_public = options[:public] || false
51
52 setup_ci if ENV['CI']
53
54 app_identifier = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)
55 api_key = lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
56
57 build
58
59 upload_to_testflight(
60 changelog: "Build #{get_build_number}",
61 api_key: api_key,
62 app_identifier: app_identifier,
63 distribute_external: is_public,
64 groups: groups,
65 )
66 end
67end