-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (68 loc) · 2.33 KB
/
Copy pathci.yml
File metadata and controls
82 lines (68 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: ci
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
jobs:
windows-ci:
name: Windows build and package check
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore
run: dotnet restore ARNetDiscovery.sln
- name: Build
run: dotnet build ARNetDiscovery.sln --configuration Release --no-restore
- name: Run tests when test projects exist
shell: pwsh
run: |
$testProjects = Get-ChildItem -Path . -Recurse -Filter '*Tests.csproj' | Select-Object -ExpandProperty FullName
if ($testProjects.Count -eq 0) {
Write-Host 'No test projects found. Skipping dotnet test.'
exit 0
}
foreach ($project in $testProjects) {
dotnet test $project --configuration Release --no-build --logger trx
}
- name: Preflight documentation and landing assets
shell: pwsh
run: |
$required = @(
'docs/index.html',
'docs/assets/site.css',
'docs/assets/site.js',
'docs/assets/favicon.png',
'docs/assets/arnet-discovery-main.png',
'docs/QUICK_START.pdf',
'docs/USER_MANUAL.pdf'
)
foreach ($file in $required) {
if (-not (Test-Path $file)) { throw "Required file missing: $file" }
}
- name: Create portable package preview
shell: pwsh
run: |
.\scripts\publish-windows-portable.ps1 -Version v0.0.0-ci -Configuration Release -Clean
- name: Verify portable package preview
shell: pwsh
run: |
.\scripts\verify-release-package.ps1 `
-ZipPath .\artifacts\release\ARNetDiscovery-v0.0.0-ci-win-x64-portable.zip `
-ChecksumPath .\artifacts\release\SHA256SUMS.txt
- name: Upload portable preview artifact
uses: actions/upload-artifact@v4
with:
name: ARNetDiscovery-ci-win-x64-portable
path: |
artifacts/release/ARNetDiscovery-v0.0.0-ci-win-x64-portable.zip
artifacts/release/SHA256SUMS.txt
if-no-files-found: error