Files
ReLibreHardwareMonitor/.github/workflows/master.yml
T
PhyxionNLandCopilot ee60348eac Use CsWin32 (#1912)
* Use CsWin32

* Update LibreHardwareMonitorLib/Hardware/Cpu/CpuLoad.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update LibreHardwareMonitorLib/Hardware/Battery/BatteryGroup.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update pull requests.yml

* Update pull requests.yml

* Update master.yml

* A couple more to CsWin32

* Restore PawnIO defaults

Fixes #1910

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-29 18:48:00 +02:00

76 lines
2.4 KiB
YAML

name: master
on:
push:
branches: [master]
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: nuget/setup-nuget@v2
- uses: microsoft/setup-msbuild@v1.1
with:
msbuild-architecture: x64
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
buildprops:
- 'Directory.Build.props'
- name: Update version
if: steps.changes.outputs.buildprops == 'false'
run: |
(Get-Content Directory.Build.props) | % {
$m = [regex]::match($_, '<Version>(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?</Version>');
if(!$m.Success -or $m.Groups[4].Success -or $m.Groups[5].Success) { $_; }
else { $_ -replace $m.Value, ("<Version>{0}.{1}.{2}-pre${{ github.run_number }}</Version>" -f $m.Groups[1].Value,$m.Groups[2].Value,([convert]::ToInt32($m.Groups[3].Value)+1)); }
} | Set-Content Directory.Build.props
- name: NuGet restore
run: dotnet restore LibreHardwareMonitor.sln
- name: Build
run: dotnet build LibreHardwareMonitor.sln --configuration Release --no-restore
- name: Publish net472
uses: actions/upload-artifact@v4
with:
name: LibreHardwareMonitor-net472
path: |
bin/Release/net472
- name: Publish netstandard20
uses: actions/upload-artifact@v4
with:
name: LibreHardwareMonitorLib-netstandard20
path: |
bin/Release/netstandard2.0
- name: Publish net80
uses: actions/upload-artifact@v4
with:
name: LibreHardwareMonitorLib-net80
path: |
bin/Release/net8.0
- name: Publish net90
uses: actions/upload-artifact@v4
with:
name: LibreHardwareMonitorLib-net90
path: |
bin/Release/net9.0
- name: Publish nupkg
uses: actions/upload-artifact@v4
with:
name: LibreHardwareMonitorLib-nupkg
path: |
bin/Release/LibreHardwareMonitorLib.*.nupkg
- name: Publish to NuGet
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}