---
title: "#140: Customizing Fastfile Lanes with fastlane Actions 🤖🎛"
url: https://littlebitesofcocoa.com/140-customizing-fastfile-lanes-with-fastlane-actions
author: Jake Marsh
published: 2015-12-04
topics: ["Fastlane","Tools"]
description: "It's another fastlane Friday! Last week in Bite #135, we covered how to install and setup fastlane and an initial Fastfile."
---

# #140: Customizing Fastfile Lanes with fastlane Actions 🤖🎛

By Jake Marsh, December 4, 2015. HTML: https://littlebitesofcocoa.com/140-customizing-fastfile-lanes-with-fastlane-actions

It's another [fastlane Friday](https://littlebitesofcocoa.com/topics/56-fastlane?v=l)!  Last week in [Bite #135](https://littlebitesofcocoa.com/135), we covered how to install and setup _fastlane_ and an initial `Fastfile`. Today we'll look at how we can take our _fastlane_ skills to the next level and customize our `Fastfile` using **actions**. Let's get started.

We briefly mentioned _fastlane_ _actions_ in [Bite #135](https://littlebitesofcocoa.com/135). Let's start by taking a closer look at them.

_Actions_ are essentially build "steps". fastlane organizes these build steps into sets called _lanes_. Each _action_ is responsible for a very specific part of the _lane's_ larger task.

Let's add an _action_ to a _lane_:

``` ruby
lane :beta do
  increment_build_number
  sigh
  gym
  pilot
end
```

By simply adding the `increment_build_number` **action**, we'll never need to manually bump our build number again!

_Actions_ can accept options:

``` ruby
increment_version_number(bump_type: "major")
```

Or return values:

``` ruby
changelog = prompt(text: "Changelog: ")
```

There's _actions_ for all of the [individual fastlane tools](https://littlebitesofcocoa.com/topics/56-fastlane?v=l) we've covered.

We can install dependencies with _actions_ like `carthage` and `cocoapods`. We can deploy with the `pilot` and `deliver` _actions_, or use `hockey` and `crashlytics` to upload to those services.

We can notify teammates with `slack` or archive each release with `github_release`.

We can even define _lanes_ to bootstrap our dev environment using _actions_ like `install_xcode_plugin` or `dotgpg_environment`.

We can "shell out" to a truly custom build script as well:

``` ruby
sh "./script.sh"
```

Simply put, _actions_ are how to get the most out of _fastlane_. If we're doing something each time we build or deploy, there's a good chance a _fastlane_ already has an _action_ for it.

If not, we can make our own. Just like the `Fastfile` itself, _actions_ are written in [Ruby](https://www.ruby-lang.org/).  We can generate a new one with:

``` shell
fastlane new_action
```

[Detailed documentation](https://github.com/fastlane/fastlane/blob/master/docs/Actions.md) on <i>all</i> actions is available, and we can check out the full list of 120+ _actions_ with:

``` shell
fastlane actions
```
