If you use macOS, you'll already have Ruby installed on your system, but using the system version of Ruby is not recommended. On macOS, you can use Homebrew, which will automatically install the recommended Ruby version for fastlane. To install fastlane on a Mac, run the following command:
brew install fastlane
From now on, the tasks depend on whether you are building an app for Android or iOS.