diff --git a/.gitignore b/.gitignore index a4db20d4..c4f61d1c 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,3 @@ local.properties **/fastlane/.env **/fastlane/metadata/**/images/** **/fastlane/report.xml -**/fastlane/latest_versions/** diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 16c926f0..2c2ec138 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -41,6 +41,7 @@ platform :android do |options| ) else deployToServer(scheduled:options[:scheduled], beta:options[:beta]) + deployToFDroid(scheduled:options[:scheduled], beta:options[:beta]) slack( default_payloads: [], # reduce the notification to the minimum @@ -90,6 +91,8 @@ platform :android do |options| skip_upload_screenshots: true, metadata_path: "fastlane/metadata/android" ) + + FileUtils.cp(lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH], "release/Cryptomator-#{version}_playstore_signed.apk") end desc "Deploy new version to server" @@ -161,6 +164,30 @@ platform :android do |options| latest_version_jsn.close release_note_file.close + + FileUtils.cp(lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH], "release/Cryptomator-#{version}_signed.apk") + + end + + desc "Deploy new version to F-Droid" + lane :deployToFDroid do |options| + gradle(task: "clean") + + gradle( + task: "assemble", + build_type: "Release", + flavor: "fdroid", + print_command: false, + properties: { + "android.injected.signing.store.file" => ENV["SIGNING_KEYSTORE_PATH"], + "android.injected.signing.store.password" => ENV["SIGNING_KEYSTORE_PASSWORD"], + "android.injected.signing.key.alias" => ENV["SIGNING_KEY_ALIAS"], + "android.injected.signing.key.password" => ENV["SIGNING_KEY_PASSWORD"], + } + ) + + FileUtils.cp(lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH], "release/Cryptomator-#{version}_fdroid_signed.apk") + end after_all do |lane| diff --git a/fastlane/README.md b/fastlane/README.md index 0302bf6f..3b2609ba 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -26,6 +26,11 @@ Run all the tests fastlane android deploy ``` Deploy new version to Google Play and APK Store options: beta:false scheduled:false (default) +### android deployToFDroid +``` +fastlane android deployToFDroid +``` +Deploy new version to F-Droid ---- diff --git a/fastlane/latest_versions/.gitignore b/fastlane/latest_versions/.gitignore new file mode 100644 index 00000000..5e7d2734 --- /dev/null +++ b/fastlane/latest_versions/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/fastlane/release/.gitignore b/fastlane/release/.gitignore new file mode 100644 index 00000000..5e7d2734 --- /dev/null +++ b/fastlane/release/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore