Apple Developer portal scan: run unit and UI tests snapshot: take screenshots of an iOS app deliver: upload iOS app, metadata and images into iTunes Connect (AppStore backend) and more
for internal (ad-hoc) deploy slack: post a notification on Slack backup_xcarchive: zip an .xcarchive file and place it somewhere else framer: take device screenshots and wrap them inside a template, adding also text and more, local and external
execute, one after another The result of each tool is passed to the next ones, via shared context Supports .env files Create your own tools or run any shell command
It’s extendable and customizable (custom tools and actions) It allows to well define our procedures (less manual work, more shared knowledge) Everything is stored inside the app repository, with the actual code CI is well integrated (running tests on Jenkins)
|options| # Check ENV [...] # If no option is passed, prompt for them unless options.has_key?(:metadata) || options.has_key?(:screenshots) || options.has_key?(:ipa) tasks = ["ipa only", "metadata and ipa", "metadata, screenshots and ipa"] selected_task = UI.select("What do you want to deploy?", tasks) hint = "" case tasks.index(selected_task) when 0 options[:ipa] = true hint = "ipa:true" when 1 options[:ipa] = true; options[:metadata] = true hint = "ipa:true metadata:true" when 2 options[:ipa] = true; options[:metadata] = true; options[:screenshots] = true hint = "ipa:true metadata:true screenshots:true" end # Print hint for next time UI.important "Hint: next time try `fastlane deploy_appstore #{hint}`" end [...] 1/5
# Upload metadata if options[:metadata] upload_metadata end # Upload screenshots if options[:screenshots] upload_screenshots end # Upload ipa to iTC if options[:ipa] [...] end end 2/5
'prod') # Upload and put build in "waiting for review" state upload_ipa_appstore(submit: true) # Notify on Slack slack({ message: "*Radio iOS #{ENV['APP_MARKETING_VERSION']}* has been uploaded and it's waiting for review ", success: true, username: "#{ENV['SLACK_USERNAME']} (fastlane)", channel: '#releases', payload: { 'CHANGELOG' => "```" + File.read("./metadata/whatsnew-en.txt") + "```" }, default_payloads: [], # No default payload }) end 3/5
"New build available in AppStore for everyone." ) # Notify on Slack slack({ message: "Uploaded Radio iOS (PROD) app #{ENV['APP_MARKETING_VERSION']} to AppStore", success: true, channel: '#dev-bot', username: "#{ENV['SLACK_USERNAME']} (fastlane)", payload: { 'iTunes Connect link' => itc_uri }, default_payloads: [], # No default payload }) # Reminder UI.important "Did you remember to tag the repo? `sh tag-release.sh`" end 5/5