This project is a fastlane plugin. To get started with fastlane-plugin-download_github_release_asset
, add it to your project by running:
fastlane add_plugin download_github_release_asset
This fastlane plugin downloads the GitHub release's asset using the GitHub API. The possible usage of the plugin can be found in example Fastfile.
Usually the asset on GitHub is a .zip
file, so here can be really useful another plugin to unzip archive.
Check out the example Fastfile
to see how to use this plugin. Try it by cloning the repo, running fastlane install_plugins
and bundle exec fastlane example
.
lane :example do |options|
release_version = options[:release_version]
github_release = get_github_release(
url: "octocat/Hello-World",
version: release_version,
api_token: "token"
)
assets = github_release["assets"]
selected_assets = assets.select do |asset|
asset["name"] == "my_asset.zip"
end
my_asset_json = selected_assets[0]
my_asset_url = my_asset_json["url"]
download_github_release_asset(
asset_url: my_asset_url,
destination_path: "./here/my_asset.zip",
api_token: "token"
)
end
To run both the tests, and code style validation, run
rake
To automatically fix many of the styling issues, use
rubocop -a
For any other issues and feedback about this plugin, please submit it to this repository.
If you have trouble using plugins, check out the Plugins Troubleshooting doc in the main fastlane
repo.
For more information about how the fastlane
plugin system works, check out the Plugins documentation.
fastlane
is the easiest way to automate building and releasing your iOS and Android apps. To learn more, check out fastlane.tools.