server-monitor-manager/.github/workflows/windows-build.yml
dependabot[bot] bcc79124c1
Bump actions/setup-dotnet from 5.4.0 to 6.0.0 (#19)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 5.4.0 to 6.0.0.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](26b0ec14cb...a98b56852c)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-10 00:33:48 +07:00

63 lines
2.7 KiB
YAML

name: Windows build
on:
push:
branches: ['**']
pull_request:
permissions:
contents: read
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- name: Set up .NET 10
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: 10.0.x
- name: Restore
run: dotnet restore src/ServerMonitorManager.Desktop/ServerMonitorManager.Desktop.csproj -p:Platform=x64 -p:PublishReadyToRun=true -p:RestoreLockedMode=true
- name: Build x64 Release
run: dotnet build src/ServerMonitorManager.Desktop/ServerMonitorManager.Desktop.csproj --configuration Release -p:Platform=x64 -p:PublishReadyToRun=true -r win-x64 --no-restore
- name: Verify formatting
run: |
dotnet format whitespace src/ServerMonitorManager.Desktop/ServerMonitorManager.Desktop.csproj --verify-no-changes --no-restore
dotnet format style src/ServerMonitorManager.Desktop/ServerMonitorManager.Desktop.csproj --verify-no-changes --no-restore
- name: Verify Windows desktop contracts
shell: pwsh
run: ./tests/windows/Test-DesktopContracts.ps1
- name: Test Desktop security
run: dotnet test tests/ServerMonitorManager.Desktop.Security.Tests/ServerMonitorManager.Desktop.Security.Tests.csproj --configuration Release -p:RestoreLockedMode=true
- name: Build test-signed MSIX installer
shell: pwsh
run: |
$directory = Join-Path $env:RUNNER_TEMP 'smm-test-signing'
$password = [Convert]::ToBase64String([Security.Cryptography.RandomNumberGenerator]::GetBytes(24))
Write-Output "::add-mask::$password"
./build/windows/New-TestSigningCertificate.ps1 -OutputDirectory $directory -Password $password
./build/windows/Build-Installer.ps1 `
-CertificatePath (Join-Path $directory 'server-monitor-manager-test-signing.pfx') `
-CertificatePassword $password
Copy-Item `
-LiteralPath (Join-Path $directory 'server-monitor-manager-test-signing.cer') `
-Destination artifacts/windows-installer/ServerMonitorManager-test-signing.cer
- name: Upload test installer
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: ServerMonitorManager-win-x64-test
path: |
artifacts/windows-installer/ServerMonitorManager-win-x64.msix
artifacts/windows-installer/ServerMonitorManager-test-signing.cer
artifacts/windows-installer/SHA256SUMS
if-no-files-found: error