forked from quoid/userscripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFastfile
More file actions
89 lines (80 loc) · 2.07 KB
/
Copy pathFastfile
File metadata and controls
89 lines (80 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
LOCAL_FASTFILE = "local/Fastfile.local.rb"
if File.file?(LOCAL_FASTFILE)
import(LOCAL_FASTFILE)
end
PROJECT_PATH = "xcode/Userscripts.xcodeproj"
# https://docs.fastlane.tools/actions/is_ci/
if is_ci
setup_ci
IS_CI = true
else
IS_CI = false
end
# https://docs.fastlane.tools/actions/app_store_connect_api_key/
app_store_connect_api_key(
key_id: ENV['APP_STORE_CONNECT_API_KEY_KEY_ID'],
issuer_id: ENV['APP_STORE_CONNECT_API_KEY_ISSUER_ID'],
key_content: ENV['APP_STORE_CONNECT_API_KEY_KEY'],
key_filepath: ENV['APP_STORE_CONNECT_API_KEY_KEY_FILEPATH'],
)
default_platform(:ios)
platform :ios do
lane :beta do
match
BUILD_NUMBER = latest_testflight_build_number(platform: "ios") + 1
File.open(ENV['GITHUB_OUTPUT'], 'a') do |file|
file.puts "ver=v#{ENV['MARKETING_VERSION']}(#{BUILD_NUMBER})"
end
build_app(
project: PROJECT_PATH,
scheme: "iOS",
xcargs: {
CURRENT_PROJECT_VERSION: BUILD_NUMBER.to_s,
MARKETING_VERSION: ENV['MARKETING_VERSION'],
},
output_directory: "build",
output_name: "Userscripts-iOS-Beta",
silent: IS_CI,
)
upload_to_testflight(
changelog: "#{ENV['GITHUB_REF_NAME']}",
distribute_external: true,
groups: ["QA"],
)
end
lane :release do
puts "ios release #{ENV['MARKETING_VERSION']}"
beta
end
end
platform :mac do
lane :beta do
match
BUILD_NUMBER = latest_testflight_build_number(platform: "osx") + 1
File.open(ENV['GITHUB_OUTPUT'], 'a') do |file|
file.puts "ver=v#{ENV['MARKETING_VERSION']}(#{BUILD_NUMBER})"
end
build_mac_app(
project: PROJECT_PATH,
scheme: "Mac",
xcargs: {
CURRENT_PROJECT_VERSION: BUILD_NUMBER.to_s,
MARKETING_VERSION: ENV['MARKETING_VERSION'],
},
output_directory: "build",
output_name: "Userscripts-Mac-Beta",
silent: IS_CI,
)
upload_to_testflight(
changelog: "#{ENV['GITHUB_REF_NAME']}",
distribute_external: true,
groups: ["QA"],
)
end
lane :release do
puts "mac release #{ENV['MARKETING_VERSION']}"
beta
end
end