Skip to content

Instantly share code, notes, and snippets.

@randomor
Created March 10, 2019 01:33
Show Gist options
  • Save randomor/382580d8944db9b34150c515db32e2e4 to your computer and use it in GitHub Desktop.
Save randomor/382580d8944db9b34150c515db32e2e4 to your computer and use it in GitHub Desktop.
Zenjournal Fastfile for React Native
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:ios)
platform :ios do
desc "Push a new beta build to TestFlight"
lane :beta do
match(type: "appstore", git_url: "https://github.com/repo-to-save-your-secret/supersecret.git")
increment_build_number(xcodeproj: "./ios/ZenJournal.xcodeproj")
build_app(scheme: "ZenJournal", project: './ios/ZenJournal.xcodeproj')
upload_to_testflight(skip_waiting_for_build_processing: true)
end
desc "Deploy a new version to the App Store"
lane :release do
match(type: "appstore", git_url: "https://github.com/repo-to-save-your-secret/supersecret.git")
# snapshot
increment_build_number(xcodeproj: "./ios/ZenJournal.xcodeproj")
build_app(scheme: "ZenJournal", project: './ios/ZenJournal.xcodeproj')
deliver(force: true, submit_for_review: false, automatic_release: false)
end
desc "Frame ios screenshots"
lane :screens do
frame_screenshots(path: './fastlane/screenshots/original', silver: true)
end
# This is to generate some fancy background for frameit
lane :backgrounds do
{empty: 'hsl(20, 100%, 60%)', fast: 'hsl(40, 100%, 60%)', simple: 'hsl(60, 100%, 60%)', search: 'hsl(80, 100%, 60%)', graph: 'hsl(100, 100%, 60%)', control: 'hsl(120, 100%, 60%)', light: 'hsl(140, 100%, 60%)'}.each do |name, color|
system("convert -size 2048x1536 xc:\"#{color}\" screenshots/backgrounds/#{name}.png")
end
end
lane :upload_screens do
deliver(
force: true,
app_version: '1.6.2',
screenshots_path: './fastlane/screenshots/original',
submit_for_review: false,
automatic_release: false,
skip_binary_upload: true,
skip_metadata: true,
overwrite_screenshots: true,
ignore_language_directory_validation: true
)
end
end
platform :android do
desc "Deploy a new alpha version to the Google Play Store"
lane :alpha do
gradle(
project_dir: "./android",
gradle_path: "./gradlew",
task: "assemble",
build_type: "Release"
)
supply(
track: "alpha",
apk: "#{lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]}"
)
end
lane :playstore do
gradle(
project_dir: "./android",
gradle_path: "./gradlew",
task: "assemble",
build_type: "Release"
)
upload_to_play_store # Uploads the APK built in the gradle step above
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment