Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using dotnet-version: 7.0.x installs .NET 8.0.x instead onf 7.0.x #597

Open
2 of 5 tasks
MikeSchulze opened this issue Jan 22, 2025 · 1 comment
Open
2 of 5 tasks
Labels
bug Something isn't working

Comments

@MikeSchulze
Copy link

MikeSchulze commented Jan 22, 2025

Description:
I added the setup-dotnet action to install Net 7.0.x if is required, but it installs the NET 8.0.x

Task version:
actions/setup-dotnet@v4

Platform:

  • Ubuntu 22.04.5
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:

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

Expected behavior:
I used a matrix and caching action behind, but the installation looks wrong.
https://github.com/MikeSchulze/gdUnit4-action/blob/50ab18fa8987997062e88fae49211bb751674e89/action.yml#L158

Actual behavior:

Run sdk_version=$(echo "net7.0" | sed 's/^net\([0-9]\.[0-9]\)$/\1.x/')
Using .NET version: '7.0.x'
Run actions/setup-dotnet@v4
  with:
    dotnet-version: 7.0.x
    cache: false
  env:
    CACHE_NAME: Linux-Godot_v4.2-stable-net7.0
    RUN_GDSCRIPT_TESTS: false
    GDUNIT_VERSION: master
    SDK_VERSION: 7.0.x
    DOTNET_VERSION: net7.0
/home/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/8.0.12/dotnet-runtime-8.0.12-linux-x64.tar.gz
dotnet-install: Remote file https://builds.dotnet.microsoft.com/dotnet/Runtime/8.0.12/dotnet-runtime-8.0.12-linux-x64.tar.gz size is 31279408 bytes.
dotnet-install: Extracting archive from https://builds.dotnet.microsoft.com/dotnet/Runtime/8.0.12/dotnet-runtime-8.0.12-linux-x64.tar.gz
dotnet-install: Downloaded file size is 31279408 bytes.
dotnet-install: The remote and local file sizes are equal.
dotnet-install: Installed version is 8.0.12
dotnet-install: Adding to current process PATH: `/usr/share/dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.
/home/runner/work/_actions/actions/setup-dotnet/v4/externals/install-dotnet.sh --skip-non-versioned-files --channel 7.0
dotnet-install: .NET Core SDK with version '7.0.410' is already installed.
Run cd "./"
8.0.404
  Determining projects to restore...
  Restored /home/runner/work/gdUnit4-action/gdUnit4-action/test.csproj (in 2.16 sec).
  test -> /home/runner/work/gdUnit4-action/gdUnit4-action/.godot/mono/temp/bin/Debug/test.dll
Build succeeded.
    0 Warning(s)
    0 Error(s)
Time Elapsed 00:00:13.91
Project 'test' has the following package references
   [net7.0]: 
   Top-level Package             Requested   Resolved
   > gdUnit4.api                 4.3.*       4.3.1   
   > gdUnit4.test.adapter        2.0.*       2.0.0   
   > Godot.SourceGenerators      4.2.1       4.2.1   
   > GodotSharp                  4.2.1       4.2.1   
   > GodotSharpEditor            4.2.1       4.2.1   
   > Microsoft.NET.Test.Sdk      17.9.0      17.9.0  
@MikeSchulze MikeSchulze added bug Something isn't working needs triage labels Jan 22, 2025
@priya-kinthali
Copy link

Hello @MikeSchulze👋,
Thank you for reporting this issue. We will investigate it and get back to you as soon as we have some feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants