Skip to content

[Feat Request] Version from .tool-versions #244

@SergioInToronto

Description

@SergioInToronto

Description

Any plans to support extracting version info from .tool-versions file? It would simplify a 2-step workflow into a single step.

Example

What I have currently:

jobs:
  release:
    steps:
      - name: Checkout code
        uses: actions/checkout@v6

      - name: Determine the buf version
        run: echo "BUF_VERSION=$(awk '/buf/{ print $2 }')" < .tool-versions >> $GITHUB_ENV

      - name: Setup buf
        uses: bufbuild/buf-setup-action@v1
        with:
          version: ${{ env.BUF_VERSION }}

I don't want to specify the version in two places (CI and .tool-versions for local development). It would be great if I could avoid this extra step in CI.

This is common in other GitHub Actions. Example:

jobs:
  release:
    steps:
      - name: Checkout code
        uses: actions/checkout@v6

      - name: Setup buf
        uses: bufbuild/buf-setup-action@v1
        with:
          version-file: .tool-versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions