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

Requesting 7.0.x does not install 7.0.201 #388

Closed Shane32 closed 1 year ago

Shane32 commented 1 year ago

Description: Specifying version 7.0.x does not install 7.0.201

Microsoft has stated that 7.0.201 is available in GitHub Actions:

See workflow run:

Task version: actions/setup-dotnet@v3

Platform:

Runner type:

Repro steps:
Add to workflow:

      - name: Setup .NET SDK
        uses: actions/setup-dotnet@v3
        with:
          dotnet-version: '7.0.x'

Expected behavior: .NET SDK 7.0.201 is installed

Actual behavior: .NET SDK 7.0.200 is used

maartenvandiemen commented 1 year ago

Same here even when reading, global.json in which explicitly 7.0.201 is mentioned. Still 7.0.200 is used.

`dotnet-install: .NET Core SDK with version '7.0.200' is already installed.

[add-matcher]/home/runner/work/_actions/actions/setup-dotnet/v3/.github/csc.json

[debug]Added matchers: 'csc'. Problem matchers scan action output for known warning or error strings and report these inline.

[debug]Node Action run completed with exit code 0

[debug]DOTNET_ROOT='/usr/share/dotnet'

[debug]Set output dotnet-version = 7.0.200`

Even though in the next task is 7.0.201 mentioned Requested SDK version: 7.0.201 global.json file: /home/runner/work/PrintTool/PrintTool/global.json Installed SDKs: Install the [7.0.201] .NET SDK or update [/home/runner/work/PrintTool/PrintTool/global.json] to match an installed SDK.

https://github.com/mvdiemen/PrintTool/actions/runs/4275523903/jobs/7442955966

panticmilos commented 1 year ago

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

stunney commented 1 year ago

Somewhat related, 6.0.* builds are broken with dotnet pack --output not being supported. There is a Preview version of MSBuild being invoked now with the GHA @v3

https://github.com/dotnet/core/issues/8245

Shane32 commented 1 year ago

Another of my workflows that uses v1 (actions/setup-dotnet@v1) seems to pull 7.0.201 just fine. This bug may be related to v3 only. In both cases it is running on ubuntu-latest.

stunney commented 1 year ago

@Shane32 what specific version are you declaring that actually works?

Shane32 commented 1 year ago

The yaml snippet shown in the issue above fails. Changing @v3 to @v1 causes 7.0.201 to get installed instead of 7.0.200

Shane32 commented 1 year ago

The dotnet pack issue is fixed in 7.0.201 as a hotfix. Not sure if MS has released an update for 6.0.x. They stated that the MSBuild version is not actually a preview build, but rather that the version number string is wrong. They do not plan to release an update until next month to fix the version number string.

Shane32 commented 1 year ago

@panticmilos any update here?

Romfos commented 1 year ago

This is critical bug

IvanZosimov commented 1 year ago

Hi, all 👋, sorry for delays. Unfortunately, this issue is not directly related to our action. It occurred because our action is based on the dotnet installer scripts and the https://aka.ms/dotnet/ API, which is used by the dotnet installer-scripts has a bug: for channel 7.0, it redirects to the wrong version 7.0.200 instead of 7.0.201. I've filed the issue in dotnet installer-scripts repo: https://github.com/dotnet/install-scripts/issues/357. As soon as they fixed this bug, our action will continue to work as expected.

IvanZosimov commented 1 year ago

Hi, all 👋 The issue with https://aka.ms/dotnet/ API is resolved: https://github.com/dotnet/install-scripts/issues/357. I'm closing this issue, sorry for the inconveniences.