- fastlane guide to get started.
- Actions.md for all the built-in integrations
- Code signing guide to show you how to do code signing right.
- FAQs for frequently asked questions
- Advanced.md for more advanced settings and tips.
- Jenkins.md for Jenkins specific help
- Platforms.md for more information about the cross-platform support of
fastlane. - Appfile.md describes the
Appfile - Advanced.md to show how to pass parameters to lanes from the command line.
- Android.md Getting started with fastlane for Android
- Gitignore.md Recommended content for your
.gitignorefile
The Fastfile is used to configure fastlane. Open it in your favourite text editor, using Ruby syntax highlighting.
Defining lanes is easy.
lane :my_lane do
# Whatever actions you like go in here.
endMake as many lanes as you like!
This block will get executed before running the requested lane. It supports the same actions as lanes.
before_all do |lane|
cocoapods
endThis block will get executed after running the requested lane. It supports the same actions as lanes.
It will only be called, if the selected lane was executed successfully.
after_all do |lane|
say "Successfully finished deployment (#{lane})!"
slack(
message: "Successfully submitted new App Update"
)
sh "./send_screenshots_to_team.sh" # Example
endThis block will get executed when an error occurs, in any of the blocks (before_all, the lane itself or after_all).
error do |lane, exception|
slack(
message: "Something went wrong with the deployment.",
success: false
)
endWhy only use the default actions? Create your own to extend the functionality of fastlane.
The build step you create will behave exactly like the built in actions.
Just run fastlane new_action. Then enter the name of the action and edit the generated Ruby file in fastlane/actions/[action_name].rb.
From then on, you can just start using your action in your Fastfile.
If you think your extension can be used by other developers as well, let me know, and we can bundle it with fastlane.
To call another action from within your action, use the following code:
Actions::DeliverAction.run(text: "Please input your password:",
key: 123)In general, think twice before you do this, most of the times, these action should be separate. Only call actions from within action if it makes sense.