Last active
March 28, 2019 17:28
-
-
Save anyuser/fe016bc9674fbae5e845e8ca5353fcbf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
unity_project_path = "../unity" | |
default_platform(:ios) | |
platform :android do | |
desc "Android – Deploy" | |
lane :deploy do | |
build_unity | |
upload_googleplay | |
end | |
desc "Android – Build in Unity" | |
lane :build_unity do | |
prev_versions = google_play_track_version_codes(track:"internal") | |
new_version = prev_versions[0]+1; | |
unity_build( | |
project_path: unity_project_path, | |
build_target: "Android", | |
build_path: "Builds/android/Kids.apk", | |
build_version: new_version ) | |
end | |
desc "Android – Upload to google play (apk, internal)" | |
lane :upload_googleplay do | |
track = "internal" | |
upload_to_play_store( | |
track:track, | |
apk:"../unity/Builds/android/Kids.apk", | |
skip_upload_metadata:true, | |
skip_upload_images:true, | |
skip_upload_screenshots:true) | |
end | |
desc "Android – Upload to google play (metadata)" | |
lane :upload_googleplay_metadata do | |
upload_to_play_store( | |
metadata_path:"../stores/googleplay" | |
) | |
end | |
end | |
platform :mac do | |
desc "Standalone – Deploy" | |
lane :deploy do | |
build_unity | |
sync_upload_steam | |
end | |
desc "Standalone – Build in Unity" | |
lane :build_unity do | |
unity_build( | |
project_path: unity_project_path, | |
build_target: "StandaloneOSX", | |
build_path: "Builds/macos/Kids.app" ) | |
unity_build( | |
project_path: unity_project_path, | |
build_target: "StandaloneWindows64", | |
build_path: "Builds/win/Kids.exe" ) | |
unity_build( | |
project_path: unity_project_path, | |
build_target: "StandaloneLinux64", | |
build_path: "Builds/linux/Kids" ) | |
end | |
desc "Standalone – Sync Builds & Upload to Steam" | |
lane :sync_upload_steam do | |
options="-ahrLv --delete --exclude=.DS_Store --exclude=steam_appid.txt --exclude=*.pdb" | |
rsync( | |
extra:options, | |
source:"../unity/Builds/linux/", | |
destination:"../stores/steam/content/linux/") | |
rsync( | |
extra:options, | |
source:"../unity/Builds/macos/", | |
destination:"../stores/steam/content/macos/") | |
rsync( | |
extra:options, | |
source:"../unity/Builds/win/", | |
destination:"../stores/steam/content/win/") | |
upload_to_steam( | |
username: "steamuser123091241", | |
steamcmd_path: "../stores/steam/builder/osx/steamcmd.sh", | |
vdf_path: "../../vdf/app_build-develop.vdf" | |
) | |
end | |
end | |
platform :ios do | |
desc "iOS – Deploy" | |
lane :deploy do | |
build_unity | |
build_xcode | |
upload_testflight_internal | |
end | |
desc "iOS – Build in Unity" | |
lane :build_unity do | |
unity_build( | |
project_path: unity_project_path, | |
build_target: "iOS", | |
build_path: "Builds/ios" ) | |
end | |
desc "iOS – Build in XCode" | |
lane :build_xcode do | |
ios_project_path = "../unity/Builds/ios/Unity-iPhone.xcodeproj" | |
scheme = "Unity-iPhone" | |
get_certificates # invokes cert | |
get_provisioning_profile # invokes sigh | |
increment_build_number({build_number: latest_testflight_build_number + 1,xcodeproj:ios_project_path}) | |
build_app( | |
silent:true, | |
scheme: scheme, | |
project:ios_project_path) | |
end | |
desc "iOS – Push ipa to TestFlight (Internal, skip processing)" | |
lane :upload_testflight_internal do | |
upload_to_testflight(skip_waiting_for_build_processing:true) | |
end | |
desc "iOS – Submit App Store info (including Screenshots)" | |
lane :submit_info do | |
deliver( | |
skip_binary_upload: true, | |
screenshots_path:"../stores/ios/screenshots", | |
metadata_path: "../stores/ios/metadata" | |
) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment