Tinfoil (tinfoil v0.2.22)

Copy Markdown View Source

Distribution automation for Burrito-based Elixir CLIs.

Tinfoil is to Burrito what cargo-dist is to Cargo: a single tool that takes your mix release output to platform binaries in a GitHub Release, with Homebrew and installer support.

What tinfoil does

  • Generates a complete GitHub Actions workflow (.github/workflows/release.yml) from a :tinfoil keyword in mix.exs
  • Reads the user's Burrito release config and resolves tinfoil's abstract target atoms (:darwin_arm64, :linux_x86_64, …) against the user's chosen Burrito target names by matching [os:, cpu:]
  • At CI time, drives one mix tinfoil.build per matrix entry: sets BURRITO_TARGET, runs mix release, packages the binary, writes a sha256 sidecar
  • After all matrix builds finish, drives mix tinfoil.publish to create a GitHub Release via the REST API and upload every archive plus a combined checksums-sha256.txt
  • Optionally generates an install.sh curl-able installer and a Homebrew formula template

Where to start

For the full narrative with installation steps, configuration examples, and the Burrito target-name resolution story, see the README.

Summary

Functions

Load the current mix project's tinfoil config.

Load the current mix project's tinfoil config, raising on error.

Return the tinfoil package version.

Functions

config()

@spec config() :: {:ok, Tinfoil.Config.t()} | {:error, term()}

Load the current mix project's tinfoil config.

This is a convenience wrapper around Tinfoil.Config.load/1 that reads from Mix.Project.config/0.

config!()

@spec config!() :: Tinfoil.Config.t()

Load the current mix project's tinfoil config, raising on error.

version()

@spec version() :: String.t()

Return the tinfoil package version.