Class: Fastlane::Actions::UploadStoreAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::UploadStoreAction
- Defined in:
- lib/fastlane/plugin/fastci/actions/upload_store_action.rb
Overview
上传 AppStore
Class Method Summary collapse
- .available_options ⇒ Object
- .description ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .run(params) ⇒ Object
Class Method Details
.available_options ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/fastlane/plugin/fastci/actions/upload_store_action.rb', line 44 def self. [ FastlaneCore::ConfigItem.new( key: :release_notes, description: "更新文案, 格式为 { \"zh-Hans\": \"修复问题\", \"en-US\": \"bugfix\"} JSON 字符串", optional: false, type: String ), FastlaneCore::ConfigItem.new( key: :isTestFlight, description: "是否为 TestFlight 打包", optional: false, type: Boolean ) ] end |
.description ⇒ Object
40 41 42 |
# File 'lib/fastlane/plugin/fastci/actions/upload_store_action.rb', line 40 def self.description "上传 AppStore" end |
.is_supported?(platform) ⇒ Boolean
61 62 63 |
# File 'lib/fastlane/plugin/fastci/actions/upload_store_action.rb', line 61 def self.is_supported?(platform) platform == :ios end |
.run(params) ⇒ Object
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 |
# File 'lib/fastlane/plugin/fastci/actions/upload_store_action.rb', line 8 def self.run(params) release_notes = JSON.parse(params[:release_notes] || "") rescue "" other_action.app_store_connect_api_key( key_id: Environment.connect_key_id, issuer_id: Environment.connect_issuer_id, key_filepath: File.("#{Environment.package_file_folder_name}/AuthKey_#{Environment.connect_key_id}.p8"), duration: 1200, # optional (maximum 1200) in_house: false # optional but may be required if using match/sigh ) if params[:isTestFlight] UI.("*************| 开始上传 TestFlight |*************") other_action.upload_to_testflight( skip_waiting_for_build_processing: true ) else UI.("*************| 开始上传 AppStore |*************") other_action.upload_to_app_store( skip_metadata: false, skip_screenshots: true, run_precheck_before_submit: false, precheck_include_in_app_purchases: false, force: true, submit_for_review: false, automatic_release: false, release_notes: release_notes ) end end |