Skip to content

Getting wrong dotnet version #674

@JCash

Description

@JCash

Description:
Our CI has started to fail because we get the new dotnet-10-rc version and not the 9.x version we specify.

Here's how we request the version:

{ name: 'Setup dotnet', uses: actions/setup-dotnet@v4, with: {dotnet-version: '9.x'}},

And here is the actual script that runs:

Run actions/setup-dotnet@v4
  with:
    dotnet-version: 9.x
    cache: false
    ...
/Users/runner/work/_actions/actions/setup-dotnet/v4/externals/install-dotnet.sh --skip-non-versioned-files --runtime dotnet --channel LTS
dotnet-install: Attempting to download using aka.ms link https://builds.dotnet.microsoft.com/dotnet/Runtime/10.0.0-rc.2.25502.107/dotnet-runtime-10.0.0-rc.2.25502.107-osx-arm64.tar.gz
...
/Users/runner/work/_actions/actions/setup-dotnet/v4/externals/install-dotnet.sh --skip-non-versioned-files --channel 9.0
dotnet-install: Attempting to download using aka.ms link https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.306/dotnet-sdk-9.0.306-osx-arm64.tar.gz

It seems related to #642

When I run dotnet, I clearly expect 9.x, not 10.x?
How am I supposed to get the correct version?

Task version:
Specify the task version

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:
Add the action in your workflow:

{ name: 'Setup dotnet', uses: actions/setup-dotnet@v4, with: {dotnet-version: '9.x'}},

Expected behavior:
I expect the version to stay on 9.x.

Actual behavior:
I get dotnet 10 release candidate.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions