GithubHelp home page GithubHelp logo

fastlane-plugin-slack_upload's Introduction

slack_upload plugin

fastlane Plugin Badge

![RubyGem Download Badge]

This plugin simply uploads a given file to your Slack.

Sometimes as part of CI builds you want to generate some files from the project that might be valuable for your team. You can think about documentation or screenshots of the application on different devices. With slack_uplaod it's easy to send them to dedicated Slack channel or directly to your teammates.

Note: Fastlane comes with slack plugin by default, although it uses slack-notifier API that doesn't support uploading files.

Getting Started

  1. Generate Slack token for Fastlane bot

    • From your Slack organization page, go to Manage -> Custom Integrations
    • Open Bots
    • Add Configuration
    • Choose a name for your bot, e.g. "fastlane"
    • Save API Token
  2. Add plugin to fastlane

fastlane add_plugin slack_upload
  1. Add slack_upload to your lane in Fastfile whenever you want to upload the file

In the following example we generate screenshots (More info) and send them to #general channel

lane :screenshots_lane do

    version = get_version_number

    # Generate screenshots
    capture_screenshots

    # Zip screenshots folder
    zip(
      path: "./fastlane/screenshots",
      output_path: "./fastlane/screenshots.zip"
    )

    # Upload to slack
    slack_upload(
            slack_api_token: "xyz", # Preferably configure as ENV['SLACK_API_TOKEN']
            title: "New version #{version} is available ",
            channel: "#general",
            file_path: "./fastlane/screenshots.zip",
            initial_comment: "Changelog goes here"
    ) 
  end

Run tests for this plugin

To run both the tests, and code style validation, run

rake

To automatically fix many of the styling issues, use

rubocop -a

Issues and Feedback

For any other issues and feedback about this plugin, please submit it to this repository.

Troubleshooting

If you have trouble using plugins, check out the Plugins Troubleshooting guide.

Using fastlane Plugins

For more information about how the fastlane plugin system works, check out the Plugins documentation.

About fastlane

fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.