Skip to content

Instantly share code, notes, and snippets.

@osmanzeki
Forked from anyuser/Fastfile
Created March 29, 2021 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osmanzeki/8bec79f3225336def8bdc3db57462b62 to your computer and use it in GitHub Desktop.
Save osmanzeki/8bec79f3225336def8bdc3db57462b62 to your computer and use it in GitHub Desktop.
# 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: "playabls",
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