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],
    org: "your-org-id",
    app: "your-app-id",
    token: ENV["BUILDS_TOKEN"],
    to: "cto@acme.com",
    lists: "qa",
    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].

Distribution is per-build. to names recipient emails and lists names distribution lists; a build with neither is uploaded but not handed to anyone. There are no channels — an upload that used channel: now sets to: or lists: instead.

Options

Option Description
file Path to the .ipa, .apk, or .aab. Required.
token A builds:write token. Required.
to Comma-separated recipient emails to distribute to.
lists Comma-separated distribution list names to distribute to.
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.
expires_in Seconds until the distribution expires.
format Force the format when the extension is unclear.
notify Notify recipients of the distribution.
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.