Adding Slack actions into our workflow

We will be working with the in-built slack action and calling it within our Fastfile, so go ahead and open up the file. The first thing we are going to do is create a private lane, which is a lane that can’t be called from the command line (or externally), but only from within another lane. At the bottom of the file, add the following:

private_lane :slack do |options|
    message = options[:message]
    success = options[:success]
    payload = options[:payload]
    version     = get_version_number(xcodeproj: "Client.xcodeproj")
    build       = get_build_number(xcodeproj: "Client.xcodeproj")
    slack(
      message: message + " :" + version + ":" + build,
      slack_url: "https://YOUR_WEBHOOK_URL",    
      success: success,
      payload: payload)
end

What ...

Get Continuous Delivery for Mobile with fastlane now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.