I had the same problem, so I decided to create a Cordova plugin for Fastlane to solve this problem.
See how to use it in this blog post or below:
Use the Cordova Fastlane plugin
Cordova Fastlane Plugin :
fastlane add_plugin cordova
Should fastlane modify the Gemfile at path 'Gemfile' for you? (y/n), y.
Fastlane, :
platform :ios do
desc "Deploy ios app on the appstore"
lane :create do
produce(app_name: "myapp")
end
lane :deploy do
match(
type: "appstore",
git_url: "https://bitbucket.org/Almouro/certificates"
)
cordova(platform: 'ios')
appstore(ipa: ENV['CORDOVA_IOS_RELEASE_BUILD_PATH'])
end
end
platform :android do
desc "Deploy android app on play store"
lane :deploy do
cordova(
platform: 'android',
keystore_path: './prod.keystore',
keystore_alias: 'prod',
keystore_password: 'password'
)
supply(apk: ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH'])
end
end
Appfile,
app_identifier "com.awesome.app"
apple_id "apple@id.com"
team_id "28323HT"
!
iOS fastlane ios create , iTunes Connect.
fastlane ios deploy fastlane android deploy !