feat/add-android-pipeline #4
@ -2,5 +2,5 @@ source('https://rubygems.org')
|
|||||||
|
|
||||||
gemspec
|
gemspec
|
||||||
|
|
||||||
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
|
plugins_path = 'fastlane/Pluginfile'
|
||||||
eval_gemfile(plugins_path) if File.exist?(plugins_path)
|
eval_gemfile(plugins_path) if File.exist?(plugins_path)
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
lane :test do
|
lane :test do
|
||||||
android_cd
|
android_cd(beta_type: "internal")
|
||||||
end
|
end
|
||||||
|
@ -1,11 +1,25 @@
|
|||||||
require 'fastlane/action'
|
require 'fastlane/action'
|
||||||
require_relative '../helper/android_cd_helper'
|
require_relative '../helper/android_cd_helper'
|
||||||
|
|
||||||
|
def is_set variable
|
||||||
|
str_variable = variable
|
||||||
|
str_variable = variable.strip if variable.class.to_s == "String"
|
||||||
|
variable && !(str_variable.nil? || str_variable.empty?)
|
||||||
|
end
|
||||||
|
|
||||||
module Fastlane
|
module Fastlane
|
||||||
module Actions
|
module Actions
|
||||||
class AndroidCdAction < Action
|
class AndroidCdAction < Action
|
||||||
def self.run(params)
|
def self.run(params)
|
||||||
|
|
||||||
|
# Check parameters
|
||||||
|
unless is_set(params[:beta_type])
|
||||||
|
UI.error("Parameters beta_type cannot be null")
|
||||||
|
puts "Error on beta type parameter"
|
||||||
|
end
|
||||||
|
|
||||||
|
UI.message("Building and deploying to Google Play Store in #{params[:beta_type]}")
|
||||||
|
|
||||||
# Decrypt the keys archive and Extract the keys archive
|
# Decrypt the keys archive and Extract the keys archive
|
||||||
Helper::AndroidCdHelper.decrypt_android_keys('.')
|
Helper::AndroidCdHelper.decrypt_android_keys('.')
|
||||||
|
|
||||||
@ -27,7 +41,7 @@ module Fastlane
|
|||||||
|
|
||||||
# Upload the Android App Bundle to the Play Store
|
# Upload the Android App Bundle to the Play Store
|
||||||
Fastlane::Actions.upload_to_play_store(
|
Fastlane::Actions.upload_to_play_store(
|
||||||
track: 'internal',
|
track: params[:beta_type],
|
||||||
json_key: './service_account_key.json',
|
json_key: './service_account_key.json',
|
||||||
aab: '../build/app/outputs/bundle/release/app-release.aab',
|
aab: '../build/app/outputs/bundle/release/app-release.aab',
|
||||||
skip_upload_metadata: true,
|
skip_upload_metadata: true,
|
||||||
@ -35,8 +49,9 @@ module Fastlane
|
|||||||
skip_upload_screenshots: true,
|
skip_upload_screenshots: true,
|
||||||
release_status: "draft",
|
release_status: "draft",
|
||||||
version_code: build_number,
|
version_code: build_number,
|
||||||
package_name: 'com.jaggerlewis.jl_2022'
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
UI.success('🍺 Successfully build & deploy appbundle to Google Play Store')
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.description
|
def self.description
|
||||||
@ -56,6 +71,10 @@ module Fastlane
|
|||||||
|
|
||||||
def self.available_options
|
def self.available_options
|
||||||
[
|
[
|
||||||
|
FastlaneCore::ConfigItem.new(key: :beta_type,
|
||||||
|
env_name: "ANDROID_CD_TEST_TYPE",
|
||||||
|
optional: false,
|
||||||
|
description: "Type of test (production, beta, alpha, internal)"),
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user