Class: Fastlane::Actions::UploadStoreAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/fastci/actions/upload_store_action.rb

Overview

上传 AppStore

Class Method Summary collapse

Class Method Details

.available_optionsObject



33
34
35
36
37
38
39
40
41
42
# File 'lib/fastlane/plugin/fastci/actions/upload_store_action.rb', line 33

def self.available_options
  [
    FastlaneCore::ConfigItem.new(
      key: :release_notes,
      description: "更新文案, 格式为 { \"zh-Hans\" => \"修复问题\", \"en-US\" => \"bugfix\"} ",
      optional: false,
      type: Hash
    )
  ]
end

.descriptionObject



29
30
31
# File 'lib/fastlane/plugin/fastci/actions/upload_store_action.rb', line 29

def self.description
  "上传 AppStore"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/fastlane/plugin/fastci/actions/upload_store_action.rb', line 44

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
# File 'lib/fastlane/plugin/fastci/actions/upload_store_action.rb', line 8

def self.run(params)
  UI.message("*************| 开始上传 AppStore |*************")

  other_action.app_store_connect_api_key(
    key_id: Environment.connect_key_id,
    issuer_id: Environment.connect_issuer_id,
    key_filepath: File.expand_path("./AuthKey_#{Environment.connect_key_id}.p8"),
    duration: 1200, # optional (maximum 1200)
    in_house: false # optional but may be required if using match/sigh
  )
  other_action.upload_to_app_store(
    skip_metadata: false,
    skip_screenshots: true,
    force: true,
    submit_for_review: false,
    automatic_release: false,
    release_notes: params[:release_notes]
  )
  
end