Commit 4186c602 authored by Thomas Markiewicz's avatar Thomas Markiewicz
Browse files

Added a separate CI/CD stage for release branch builds and uploading to...

Added a separate CI/CD stage for release branch builds and uploading to Playstore only on this new stage; otherwise just sanity building
parent 6318be99
stages:
- build_only
- playstore
variables:
......@@ -14,9 +15,27 @@ playstore:
stage: playstore
script:
- bundle exec fastlane playstore
only:
- /^release\/.*$/
environment:
name: playstore
artifacts:
name: "one_playstore_$MAJOR.$MINOR.$PATCH-$CI_COMMIT_REF_NAME+$CI_PIPELINE_IID.apk"
paths:
- ./*.apk
expire_in: 4 weeks
build_only:
tags:
- android
stage: build_only
script:
- bundle exec fastlane build
only:
- develop
- master
- /^feature\/.*$/
- /^issue\/.*$/
environment:
name: playstore
artifacts:
......
......@@ -51,4 +51,25 @@ platform :android do
end
end
desc "Sanity build without beta deployment"
lane :build do
gradle(task: "clean")
gradle(
task: "assemble",
build_type: "Release",
print_command: true
)
file_path = lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]
file_name = file_path.gsub(/\/.*\//,"")
target_filename = "one_playstore_" + ENV["MAJOR"] + "." + ENV["MINOR"] + "." + ENV["PATCH"] + "-" + ENV["CI_COMMIT_REF_NAME"] + "+" + ENV["CI_PIPELINE_IID"] + ".apk"
target_path = "../" + target_filename
sh "echo Copying " + file_name + " to: " + target_path
sh "cp " + file_path + " " + target_path
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment