fastlane-plugin-paper_tools_builds

Upload a build to Builds by paper.tools from a fastlane lane. The paper_tools_builds_upload action wraps the builds CLI, so it inherits the resumable multipart upload, the exit codes, and the staging-or-production default without reimplementing any of them.

This directory is the source of truth. It is published to RubyGems as fastlane-plugin-paper_tools_builds. The name portion is underscored because fastlane rejects a dash after the fastlane-plugin- prefix.

Setup

Install the CLI, then add the plugin:

brew install paper-tools/tap/builds
fastlane add_plugin paper_tools_builds

paper_tools_builds_upload shells out to the builds binary, so it must be on PATH (or pass binary: with a path).

Usage

lane :distribute do
  build_app(scheme: "App")

  build_id = paper_tools_builds_upload(
    file: lane_context[SharedValues::IPA_OUTPUT_PATH],
    channel: "qa",
    org: "your-org-id",
    app: "your-app-id",
    token: ENV["BUILDS_TOKEN"],
    to: "qa,cto@acme.com",
    version: get_version_number,
    build_number: get_build_number
  )

  UI.message("Uploaded build #{build_id}")
end

Pass org, app, and token at the call site — the plugin no longer reads them from the environment for you. The token still never belongs in a Fastfile, so read it from a CI secret as above. The build id the action returns is also on lane_context[SharedValues::PAPER_TOOLS_BUILDS_BUILD_ID].

Options

Option Description
file Path to the .ipa, .apk, or .aab. Required.
channel The channel to land on. Required.
token A builds:write token. Required.
to Comma-separated recipients.
org The organisation id. Required.
app The app id. Required.
version The marketing version.
build_number The build number.
release_notes Release notes.
tags Comma-separated tags.
format Force the format when the extension is unclear.
notify Notify recipients.
concurrency Parallel part uploads.
binary Path to the builds binary. Defaults to builds.

A non-zero exit fails the lane

The action fails the lane on any non-zero exit, and the exit code says which class it was — auth, validation, quota, network. See the CLI's exit-code table in the service README.md.

Development

bundle install
bundle exec rspec

The canonical repository is a private GitLab project, mirrored to GitHub for public issues and the RubyGems source link. Push to GitLab; the mirror follows. A v* tag publishes the gem to RubyGems from CI.