Skip to content

Add dotnet-version-file input to read the .NET SDK version from a file#743

Open
somaz94 wants to merge 1 commit into
actions:mainfrom
somaz94:feat/dotnet-version-file
Open

Add dotnet-version-file input to read the .NET SDK version from a file#743
somaz94 wants to merge 1 commit into
actions:mainfrom
somaz94:feat/dotnet-version-file

Conversation

@somaz94

@somaz94 somaz94 commented Jun 12, 2026

Copy link
Copy Markdown

Adds a dotnet-version-file input that resolves the .NET SDK version from a file, so the version can live in a single source of truth shared with asdf / mise. It reads the dotnet entry from a .tool-versions file, or the sdk.version field from a global.json. This mirrors the existing global-json-file handling and the *-version-file convention used by setup-node / setup-python.

- uses: actions/setup-dotnet@v5
  with:
    dotnet-version-file: .tool-versions

Related issue: #459

Validation

  • npm test — 157 passed (4 new tests: missing file fails, .tool-versions read, global.json read via the same input, no-dotnet-entry warning)
  • npm run format-check — clean
  • npm run lint — clean
  • npm run builddist/ rebuilt (built locally on Node 23; the Check dist/ workflow re-verifies on Node 24)

@somaz94 somaz94 marked this pull request as ready for review June 17, 2026 02:12
@somaz94 somaz94 requested a review from a team as a code owner June 17, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants