Skip to content

Commit

Permalink
wip: setup fastlane [skip ci]
Browse files Browse the repository at this point in the history
Signed-off-by: Álvaro Brey <[email protected]>
  • Loading branch information
AlvaroBrey committed Feb 2, 2023
1 parent bed7449 commit bb9ecab
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
/projectFilesBackup/
# fastlane
/vendor/bundle
fastlane/report.xml
60 changes: 49 additions & 11 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,61 @@
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

## config
# add following to your shell rc:
# export FASTLANE_NOTES_UPLOAD_STORE_FILE=""
# export FASTLANE_NOTES_UPLOAD_STORE_PASSWORD=""
# export FASTLANE_NOTES_UPLOAD_KEY_ALIAS=""
# export FASTLANE_NOTES_UPLOAD_KEY_PASSWORD=""
# export FASTLANE_NEXTCLOUD_GITHUB_API_TOKEN=""


skip_docs

default_platform(:android)

platform :android do
desc "Submit a new Beta Build to Crashlytics Beta"
lane :beta do
gradle(task: "clean assembleRelease")
crashlytics

# sh "your_script.sh"
# You can also use other beta testing services here
desc "Build app bundle"
lane :buildBundle do
gradle(
task: 'bundle',
flavor: 'play',
build_type: 'Release',
print_command: false,
properties: {
"android.injected.signing.store.file" => ENV["FASTLANE_NOTES_UPLOAD_STORE_FILE"],
"android.injected.signing.store.password" => ENV["FASTLANE_NOTES_UPLOAD_STORE_PASSWORD"],
"android.injected.signing.key.alias" => ENV["FASTLANE_NOTES_UPLOAD_KEY_ALIAS"],
"android.injected.signing.key.password" => ENV["FASTLANE_NOTES_UPLOAD_KEY_PASSWORD"],
}
)
end


private_lane :tag do |options|
tagName = versionName()
add_git_tag(
tag: tagName,
sign: true
)
push_git_tags(tag: tagName)
end

desc "Deploy a new version to the Google Play"
lane :deploy do
gradle(task: "clean assembleRelease")
upload_to_play_store
desc "Read version name"
private_lane :versionName do
File.open("../app/build.gradle","r") do |f|
versionName = f.read.match(/versionName "([0-9\.]*)"$/)[1]
versionName
end
end

desc "Upload release artifacts to Google Play"
lane :uploadToPlayStore do
upload_to_play_store(
skip_upload_images: true,
skip_upload_apk: true,
aab: "app/build/outputs/bundle/playRelease/app-play-release.aab",
)
end

end

0 comments on commit bb9ecab

Please sign in to comment.