File tree Expand file tree Collapse file tree 3 files changed +39
-3
lines changed
Expand file tree Collapse file tree 3 files changed +39
-3
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,29 @@ jobs:
2828 echo "TAG=$tag" >> $env:GITHUB_OUTPUT
2929 echo "Version: $version"
3030
31+ - name : Get latest .NET SDK version
32+ id : dotnet_version
33+ shell : pwsh
34+ run : |
35+ # Fetch latest .NET 8.0 LTS version
36+ try {
37+ $response = Invoke-RestMethod -Uri "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json"
38+ $latestRelease = $response.'latest-release'
39+ $latestSdk = $response.'latest-sdk'
40+ Write-Host "Latest .NET 8.0 SDK: $latestSdk"
41+ Write-Host "Latest .NET 8.0 Runtime: $latestRelease"
42+ echo "SDK_VERSION=$latestSdk" >> $env:GITHUB_OUTPUT
43+ echo "RUNTIME_VERSION=$latestRelease" >> $env:GITHUB_OUTPUT
44+ } catch {
45+ Write-Host "Using fallback version: 8.0.x"
46+ echo "SDK_VERSION=8.0.x" >> $env:GITHUB_OUTPUT
47+ echo "RUNTIME_VERSION=8.0.x" >> $env:GITHUB_OUTPUT
48+ }
49+
3150 - name : Setup .NET
3251 uses : actions/setup-dotnet@v4
3352 with :
34- dotnet-version : ' 6.0.x '
53+ dotnet-version : ${{ steps.dotnet_version.outputs.SDK_VERSION }}
3554
3655 - name : Restore dependencies
3756 run : dotnet restore FFmpegInstaller.csproj
Original file line number Diff line number Diff line change @@ -24,10 +24,27 @@ jobs:
2424 - name : Checkout code
2525 uses : actions/checkout@v4
2626
27+ - name : Get latest .NET SDK version
28+ id : dotnet_version
29+ shell : pwsh
30+ run : |
31+ # Fetch latest .NET 8.0 LTS version
32+ try {
33+ $response = Invoke-RestMethod -Uri "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json"
34+ $latestRelease = $response.'latest-release'
35+ $latestSdk = $response.'latest-sdk'
36+ Write-Host "Latest .NET 8.0 SDK: $latestSdk"
37+ Write-Host "Latest .NET 8.0 Runtime: $latestRelease"
38+ echo "SDK_VERSION=$latestSdk" >> $env:GITHUB_OUTPUT
39+ } catch {
40+ Write-Host "Using fallback version: 8.0.x"
41+ echo "SDK_VERSION=8.0.x" >> $env:GITHUB_OUTPUT
42+ }
43+
2744 - name : Setup .NET
2845 uses : actions/setup-dotnet@v4
2946 with :
30- dotnet-version : ' 6.0.x '
47+ dotnet-version : ${{ steps.dotnet_version.outputs.SDK_VERSION }}
3148
3249 - name : Restore dependencies
3350 run : dotnet restore FFmpegInstaller.csproj
Original file line number Diff line number Diff line change 22
33 <PropertyGroup >
44 <OutputType >WinExe</OutputType >
5- <TargetFramework >net6 .0-windows</TargetFramework >
5+ <TargetFramework >net8 .0-windows</TargetFramework >
66 <UseWindowsForms >true</UseWindowsForms >
77 <ImplicitUsings >enable</ImplicitUsings >
88 <Nullable >disable</Nullable >
You can’t perform that action at this time.
0 commit comments