actions / setup-dotnet

Set up your GitHub Actions workflow with a specific version of the .NET core sdk
MIT License
922 stars 454 forks source link

Dotnet version is always 6 #346

Closed tomarad closed 1 year ago

tomarad commented 1 year ago

Description: Even when specifying a version with dotnet-version, dotnet version is still 6.

Task version: 3

Platform:

Runner type:

Repro steps:
Check out this repo and these runs: version 2, version 3.

Expected behavior: dotnet --version should print the version from the parameter.

Actual behavior: dotnet --version prints 6.0.402.

IvanZosimov commented 1 year ago

Hi, @tomarad 👋 Thanks for the bug report! The new major version v3 of our action brought some breaking changes and the behaviour that you described is completely expected. The dotnet --version command print out the latest version installed on the runner and, by the way, this version is default. If you want to change default version to 3.0.103, you need to change your global.json file accordingly.

By now, I'm going to close this issue, If you have any additional questions feel free to ping me.

tomarad commented 1 year ago

Thanks @IvanZosimov, my bad :sweat_smile:.