Skip to content

romeovs/tool-versions-action

Repository files navigation

@romeovs/tool-versions-action

Usage

Add a step to you workflow to read the versions from .tool-versions:

- name: Read .tool-versions
  uses: romeovs/tool-versions-action@v3
  id: versions

Then, use the outputs of that step, for example:

- uses: pnpm/action-setup@v2
  name: Install pnpm
  with:
    version: ${{ steps.versions.outputs.pnpm }}

Inputs

  • path: path of the .tool-versions file, defaults to .tool-versions

Outputs

This action creates one output per entry in the .tool-versions file, containing the version.

Example workflow

name: Get version info
on: push
jobs:
  build:
  runs-on: ubuntu-latest
  steps:
    - uses: actions/checkout@v3
    - name: Read .tool-versions
      uses: romeovs/tool-versions-action@v3
      id: versions
    - uses: pnpm/action-setup@v2
      name: Install pnpm ${{ steps.versions.outputs.pnpm }}
      with:
        version: ${{ steps.versions.outputs.pnpm }}
    - name: Use Node.js ${{ steps.versions.outputs.nodejs}}
      uses: actions/setup-node@v3
      with:
        node-version: ${{ steps.versions.outputs.nodejs}}

License

The scripts and documentation in this project are released under the MIT License.

About

Read version from a .tool-versions file

Resources

License

Stars

Watchers

Forks

Packages

No packages published