https://juejin.cn/post/7008553785672859656
https://juejin.cn/post/6844904205489012744
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:ios)
platform :ios do
desc "Description of what the lane does"
lane :push do
# add actions here: https://docs.fastlane.tools/actions
gym(
clean: true,
silent: true,
export_method: 'ad-hoc',
output_directory: './fastlane/build',
output_name:"customer.ipa",
scheme: 'Customer',
configuration: 'Release',
###########
# sdk:"iOS 12.0",
# archive_path:"./fastlane/Archive",
include_symbols:true,
export_xcargs: "-allowProvisioningUpdates",
)
updateVersionDes = "OS包用户端更新"
pgyer(
api_key: "xxx",
user_key: "xxx",
update_description: updateVersionDes
)
end
end
上传至appstore:
https://juejin.cn/post/7068583210229170212
/// 上传到指定的team
https://juejin.cn/post/6844903495200407560
/// 更多的fastlane参数
https://existorlive.github.io/2020/12/17/Fastlane.html
desc "以 app-store 方式打包并上传到 iTunes Connect"
lane :release do
puts "自动生成 Provisioning Profiles 文件"
puts "以 app-store 方式打包"
gym(
# 指定打包所使用的输出方式 (可选: app-store, package, ad-hoc, enterprise, development)
export_method: "app-store",
# 指定项目的 scheme 名称
scheme: "DriverEn",
# 指定输出的文件夹地址
output_directory: './fastlane/build',
output_name:"driver.ipa",
# 指定打包方式 (可选: Release, Debug)
configuration: "Release",
export_xcargs: "-allowProvisioningUpdates"
)
puts "上传 ipa 包到 TestFlight"
pilot(team_name: "QWQER LLC")
#puts "上传 ipa 包到 iTunes Connect"
#deliver(
# 跳过截图上传
#skip_screenshots: true,
# 跳过元数据上传
#skip_metadata: true,
# 跳过审核直接上传
#force: true
#)
end
end
上传到钉钉机器人中的消息
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:ios)
platform :ios do
desc "Description of what the lane does"
lane :push do
# add actions here: https://docs.fastlane.tools/actions
gym(
clean: true,
silent: true,
export_method: 'ad-hoc',
output_directory: './fastlane/build',
output_name:"customer.ipa",
scheme: 'Customer',
configuration: 'Release',
###########
# sdk:"iOS 12.0",
# archive_path:"./fastlane/Archive",
include_symbols:true,
export_xcargs: "-allowProvisioningUpdates",
)
updateVersionDes = "@周美婵(Coco) @高伟隆(Lorentz) @许丹(许丹) @许听(许听) iOS包用户端更新"
pgyer(
api_key: "606c5b6de8a2ac76aeeea7532a61c789",
user_key: "2a4ce2b21570f022514896320716280c",
update_description: updateVersionDes
)
# 钉钉机器人
app_patch = "build/driver.ipa"
app_version = "1.0.0"
app_build_version = "1"
app_name = "博帅王子"
app_url = "https://www.pgyer.com/s2iU"
dingTalk_url = "https://oapi.dingtalk.com/robot/send?access_token=c9f1a24d7d82be81dcbe2a457e4f2e6a3ccc47fa5a3cecbda249a1dbc82d2e5a"
# 构造消息格式
actionCard =
{
"markdown": {
"title": "iOS 内测版",
"text": " # iOS国外物流配送端 \n # 无敌没bug版 更新了
\n\n \n\n [@13430797822](#{app_url})\n [@15875515950](#{app_url})\n [@17580959503](#{app_url})\n [@15112588418](#{app_url})\n [@13823725437](#{app_url})\n
![](https://www.pgyer.com/app/qrcode/s2iU) \n\n",
},
"at": {
"atMobiles": [
"13430797822",
"15875515950",
"17580959503",
#"15112588418",
#"13823725437"
],
"isAtAll": false
},
"msgtype": "markdown"
}
puts "发送的钉钉消息:#{actionCard} "
uri = URI.parse(dingTalk_url)
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
request = Net::HTTP::Post.new(uri.request_uri)
request.add_field('Content-Type', 'application/json')
request.body = actionCard.to_json
response = https.request(request)
end
desc "以 app-store 方式打包并上传到 iTunes Connect"
lane :release do
puts "自动生成 Provisioning Profiles 文件"
puts "以 app-store 方式打包"
gym(
# 指定打包所使用的输出方式 (可选: app-store, package, ad-hoc, enterprise, development)
export_method: "app-store",
# 指定项目的 scheme 名称
scheme: "Customer",
# 指定输出的文件夹地址
output_directory: './fastlane/build',
output_name:"driver.ipa",
# 指定打包方式 (可选: Release, Debug)
configuration: "Release",
export_xcargs: "-allowProvisioningUpdates"
)
puts "上传 ipa 包到 TestFlight"
pilot(team_name: "Shenzhen Kuai Feike Logistics Co., Ltd.")
#puts "上传 ipa 包到 iTunes Connect"
#deliver(
# 跳过截图上传
#skip_screenshots: true,
# 跳过元数据上传
#skip_metadata: true,
# 跳过审核直接上传
#force: true
#)
end
end
网友评论