Orchestrate a single-target Burrito build, archive, and checksum.
A single run/2 call is what one CI matrix entry does: resolve the
tinfoil target to the user's Burrito name, run mix release with
BURRITO_TARGET set, then locate the binary, tar.gz it, and write
a sha256 sidecar.
This module is the heart of tinfoil's tool-in-the-loop story: the
generated workflow calls mix tinfoil.build --target <atom> once
per matrix entry instead of embedding the packaging logic in bash,
so upgrading tinfoil upgrades the pipeline.
Summary
Functions
Build a single target end-to-end.
Check that the GITHUB_REF_NAME tag (if set) matches the given version.
Types
@type opts() :: [ target: Tinfoil.Target.target(), skip_release: boolean(), output_dir: Path.t() ]
Functions
@spec run(Tinfoil.Config.t(), opts()) :: result()
Build a single target end-to-end.
Steps:
- Look up the user's Burrito target name for the tinfoil target.
- Unless
:skip_releaseis set, exportBURRITO_TARGETand runmix releasein the current project. - Locate
burrito_out/<app>_<burrito_name>and tar.gz it into the output directory with the configured archive basename. - Write a
.sha256sidecar next to the archive.
Returns a map describing what was produced.
Check that the GITHUB_REF_NAME tag (if set) matches the given version.
Returns :ok when the env var is unset or the versions match.
Returns {:error, message} on mismatch.