fix text warns and explicitly target windows-2025-vs2026 for runners
This commit is contained in:
@@ -3,11 +3,11 @@ name: release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
- "v*"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version/tag to create (e.g. v1.2.3)'
|
||||
description: "Version/tag to create (e.g. v1.2.3)"
|
||||
required: false
|
||||
type: string
|
||||
|
||||
@@ -16,16 +16,16 @@ permissions:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-2025
|
||||
runs-on: windows-2025-vs2026
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
|
||||
|
||||
- uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
|
||||
with:
|
||||
dotnet-version: "10.x"
|
||||
|
||||
|
||||
- uses: nuget/setup-nuget@fd55a6f3b34392fa83fde1454582407d8c714123 # 4.0.0
|
||||
|
||||
|
||||
- uses: microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # 3.0.0
|
||||
with:
|
||||
msbuild-architecture: x64
|
||||
@@ -109,16 +109,16 @@ jobs:
|
||||
- name: Stage Release Assets
|
||||
run: |
|
||||
New-Item -ItemType Directory -Force -Path release-staging
|
||||
|
||||
|
||||
# Copy application binary (single file, self-contained, with .NET version)
|
||||
Copy-Item publish/app/LibreHardwareMonitor.Windows.WinUI.exe release-staging/LibreHardwareMonitor.Windows.WinUI-net10.0.exe
|
||||
|
||||
|
||||
# Copy library DLL (net10.0 build)
|
||||
Copy-Item bin/Release/x64/net10.0/LibreHardwareMonitorLib.dll release-staging/LibreHardwareMonitorLib.dll
|
||||
|
||||
|
||||
# Create source code ZIP
|
||||
git archive --format=zip --output release-staging/LibreHardwareMonitor-source.zip HEAD
|
||||
|
||||
|
||||
# Generate SHA256 checksums
|
||||
$sha256 = [System.Security.Cryptography.SHA256]::Create()
|
||||
Get-ChildItem release-staging | Where-Object { $_.Name -ne "SHA256SUMS.txt" } | ForEach-Object {
|
||||
@@ -128,7 +128,7 @@ jobs:
|
||||
$hash = [System.BitConverter]::ToString($hashBytes).Replace("-", "").ToLower()
|
||||
"{0} {1}" -f $hash, $_.Name
|
||||
} | Set-Content release-staging/SHA256SUMS.txt
|
||||
|
||||
|
||||
# Log hashes for visibility
|
||||
Get-Content release-staging/SHA256SUMS.txt
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-2025
|
||||
runs-on: windows-2025-vs2026
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
|
||||
|
||||
@@ -18,7 +18,7 @@ public class AppSettingsTests : IDisposable
|
||||
|
||||
// Use reflection to instantiate AppSettings with custom filename
|
||||
var ctor = typeof(AppSettings).GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new[] { typeof(string) }, null);
|
||||
_settings = (AppSettings)ctor.Invoke(new object[] { _tempFile });
|
||||
_settings = (AppSettings)ctor!.Invoke(new object[] { _tempFile });
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
@@ -109,7 +109,7 @@ public class AppSettingsTests : IDisposable
|
||||
|
||||
// Create new instance pointing to same file
|
||||
var ctor = typeof(AppSettings).GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new[] { typeof(string) }, null);
|
||||
var loadedSettings = (AppSettings)ctor.Invoke(new object[] { _tempFile });
|
||||
var loadedSettings = (AppSettings)ctor!.Invoke(new object[] { _tempFile });
|
||||
|
||||
loadedSettings.Load();
|
||||
|
||||
|
||||
@@ -221,6 +221,7 @@ public class SensorFormatterTests
|
||||
mockSensor.Setup(s => s.SensorType).Returns(SensorType.Temperature);
|
||||
|
||||
var result = SensorFormatter.GetPlotValue(mockSensor.Object, TemperatureUnit.Fahrenheit);
|
||||
Assert.NotNull(result);
|
||||
Assert.Equal(77.9, result.Value, 1);
|
||||
}
|
||||
|
||||
@@ -243,6 +244,7 @@ public class SensorFormatterTests
|
||||
|
||||
var result = SensorFormatter.GetPlotValue(mockSensor.Object, 25.5f, TemperatureUnit.Fahrenheit);
|
||||
|
||||
Assert.NotNull(result);
|
||||
Assert.Equal(77.9, result.Value, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ public class SimpleViewModelsTests
|
||||
{
|
||||
private class TestViewModel : ViewModelBase
|
||||
{
|
||||
private string _testProperty;
|
||||
private string _testProperty = string.Empty;
|
||||
public string TestProperty
|
||||
{
|
||||
get => _testProperty;
|
||||
@@ -28,7 +28,7 @@ public class SimpleViewModelsTests
|
||||
public void ViewModelBase_SetProperty_ChangesValueAndRaisesEvent()
|
||||
{
|
||||
var vm = new TestViewModel();
|
||||
string changedProperty = null;
|
||||
string? changedProperty = null;
|
||||
vm.PropertyChanged += (sender, args) => changedProperty = args.PropertyName;
|
||||
|
||||
// Change value
|
||||
@@ -57,7 +57,7 @@ public class SimpleViewModelsTests
|
||||
public void ViewModelBase_OnPropertyChanged_RaisesEvent()
|
||||
{
|
||||
var vm = new TestViewModel();
|
||||
string changedProperty = null;
|
||||
string? changedProperty = null;
|
||||
vm.PropertyChanged += (sender, args) => changedProperty = args.PropertyName;
|
||||
|
||||
vm.TriggerPropertyChanged("CustomProperty");
|
||||
|
||||
Reference in New Issue
Block a user