mirror of
https://github.com/expo/eas-cli.git
synced 2026-11-15 17:31:46 -10:00
# Why
This PR stack adds local composite functions for EAS workflows. A `function.yml` declares `outputs:` with templated values, and the caller should read them as `${{ steps.setup.outputs.version }}`, where `setup` is the id of the calling step.
After the previous PRs, data flows into a composite function (inputs, env) but nothing flows back out. This PR closes that loop.
# How
For a composite function that declares `outputs:`, `CompositeFunctionExpander` appends a synthetic function step after the inner steps, reusing the caller's step id.
- The step runs with `if: ${{ always() }}`
- Output values are interpolated against the composite-function-local step namespace
# Test Plan
Added outputs unit tests.
@expo/steps
TBD
Examples
If you want to run config examples from the examples directory, e.g. examples/simple, follow the steps:
- Run
yarnandyarn buildin the root of the monorepo. - Add
alias eas-steps="/REPLACE/WITH/PATH/TO/eas-cli/packages/steps/cli.sh"to your .zshrc/.bashrc/etc. - cd into examples/simple and run
eas-steps config.yml project [darwin|linux]. The first argument is the config file, and the second is the default working directory for the config file. The third argument is the platform for which you want to simulate running a custom build, it defaults to the platform of the device on which the CLI is currently being run.
Example project
See the example project using custom builds at https://github.com/expo/eas-custom-builds-example.