Github action that parses .tool-versions into the environment.
- name: Parse .tool-versions
uses: wistia/[email protected]
with:
uppercase: 'true'
postfix: '_tool_versions'
filename: '.tool-versions'
# Sometime later in the same job...
- uses: mskelton/setup-yarn@v1
with:
node-version: ${{ env.NODEJS_TOOL_VERSION }}
All inputs are optional, inputs shown are defaults. by default this command appends _tool_version to the name of each entry in the .tool-versions file, uppercases it, and adds it to GITHUB_ENV
set this to any string besides 'true' to use snake_case instead of MACRO_CASE
use to control what is appended to the tool name. _tool_version was chosen in the unlikely event you already have a {tool}_VERSION flag set; you could set postfix to _version if you wish.
The filename read from. This can be a path