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

Installs latest SDK version before it is available/is released. #381

Closed VMelnalksnis closed 1 year ago

VMelnalksnis commented 1 year ago

Description: The latest version in both https://dotnet.microsoft.com/en-us/download/dotnet/7.0 and https://github.com/dotnet/core/releases is 7.0.2 (dotnet --version 7.0.102), however setup-dotnet installed 7.0.200 with the following global.json file:

{
    "sdk": {
        "version": "7.0.102",
        "rollForward": "latestFeature",
        "allowPrerelease": false
    }
}

I understand that this follows the rollForward settings, however I don't expect it to install unreleased versions that break the build.

Task version: 3.0.3

Platform:

Runner type:

Repro steps:
Here's a link to the run that installed the unreleased version - https://github.com/VMelnalksnis/Gnomeshade/actions/runs/4175978230/jobs/7231771550

Expected behavior: setup-dotnet installs versions that have been released/have release notes.

Actual behavior: setup-dotnet installs unpublished versions with breaking changes and without release notes.

panticmilos commented 1 year ago

hi @VMelnalksnis, thank you for the report, we will take a look at it :)

dmitry-shibanov commented 1 year ago

Hello @VMelnalksnis. Thank you for your report. I think it is an expected behaviour because when you set up rollForward to latestFeature the action will try to install the latest patch version. The action rely on releases.json that is why if the version is available there it will be installed.

For now I'm going to close the issue.

VMelnalksnis commented 1 year ago

That's weird, because at the time I checked the index - https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json - and it was still 7.0.2/7.0.102, but alright. Then I guess it's just an issue in the release of .NET.