Skip to content

Commit b35d264

Browse files
authored
Merge pull request #1 from masarray/public-repo-hardening
Harden public repo, SEO docs, landing page, and release automation
2 parents dbf871a + 1ef369c commit b35d264

31 files changed

Lines changed: 1489 additions & 2118 deletions

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master, main ]
6+
pull_request:
7+
branches: [ master, main ]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
build:
15+
name: Restore and build
16+
runs-on: windows-latest
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup .NET
23+
uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: 8.0.x
26+
27+
- name: Restore
28+
run: dotnet restore .\ProcessBusSuite.sln
29+
30+
- name: Build
31+
run: dotnet build .\ProcessBusSuite.sln -c Release --no-restore /p:ContinuousIntegrationBuild=true
32+
33+
- name: Run tests when present
34+
shell: pwsh
35+
run: |
36+
$testProjects = Get-ChildItem -Path . -Recurse -Filter *.csproj |
37+
Where-Object { $_.FullName -match '(Test|Tests)\\|\.(Test|Tests)\.csproj$' }
38+
39+
if (-not $testProjects) {
40+
Write-Host "No test project found. Build validation completed."
41+
exit 0
42+
}
43+
44+
foreach ($project in $testProjects) {
45+
dotnet test $project.FullName -c Release --no-build --logger "trx"
46+
}

.github/workflows/pages.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ master, main ]
6+
paths:
7+
- 'docs/**'
8+
- '.github/workflows/pages.yml'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: pages
18+
cancel-in-progress: true
19+
20+
jobs:
21+
deploy:
22+
name: Deploy static docs site
23+
runs-on: ubuntu-latest
24+
environment:
25+
name: github-pages
26+
url: ${{ steps.deployment.outputs.page_url }}
27+
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
32+
- name: Configure Pages
33+
uses: actions/configure-pages@v5
34+
35+
- name: Upload Pages artifact
36+
uses: actions/upload-pages-artifact@v3
37+
with:
38+
path: docs
39+
40+
- name: Deploy to GitHub Pages
41+
id: deployment
42+
uses: actions/deploy-pages@v4
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: Release Windows portable package
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version label, for example 1.2.0-public-beta'
8+
required: true
9+
default: '1.2.0-public-beta'
10+
publish_release:
11+
description: 'Create or update a GitHub Release'
12+
required: true
13+
default: false
14+
type: boolean
15+
prerelease:
16+
description: 'Mark GitHub Release as prerelease'
17+
required: true
18+
default: true
19+
type: boolean
20+
draft:
21+
description: 'Create GitHub Release as draft'
22+
required: true
23+
default: false
24+
type: boolean
25+
release_notes_file:
26+
description: 'Markdown file used as release body'
27+
required: true
28+
default: 'docs/RELEASE_NOTES_v1.2.0.md'
29+
push:
30+
tags:
31+
- 'v*'
32+
33+
permissions:
34+
contents: write
35+
36+
jobs:
37+
package:
38+
name: Build portable Windows package
39+
runs-on: windows-latest
40+
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@v4
44+
with:
45+
fetch-depth: 0
46+
47+
- name: Setup .NET
48+
uses: actions/setup-dotnet@v4
49+
with:
50+
dotnet-version: 8.0.x
51+
52+
- name: Resolve release version
53+
id: version
54+
shell: pwsh
55+
run: |
56+
$version = '${{ github.event.inputs.version }}'
57+
if ([string]::IsNullOrWhiteSpace($version)) {
58+
$version = '${{ github.ref_name }}'
59+
}
60+
$version = $version.Trim()
61+
if ($version.StartsWith('v')) { $version = $version.Substring(1) }
62+
if ([string]::IsNullOrWhiteSpace($version)) { throw 'Unable to resolve release version.' }
63+
"value=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
64+
Write-Host "Release version: $version"
65+
66+
- name: Restore
67+
run: dotnet restore .\ProcessBusSuite.sln
68+
69+
- name: Build
70+
run: dotnet build .\ProcessBusSuite.sln -c Release --no-restore /p:ContinuousIntegrationBuild=true
71+
72+
- name: Publish portable package
73+
shell: pwsh
74+
run: |
75+
.\scripts\publish-windows-portable.ps1 -Version '${{ steps.version.outputs.value }}' -Configuration Release -Runtime win-x64
76+
77+
- name: Verify portable package
78+
shell: pwsh
79+
run: |
80+
$zip = ".\artifacts\release\ProcessBusInsight-v${{ steps.version.outputs.value }}-win-x64-portable.zip"
81+
.\scripts\verify-release-package.ps1 -PackageZip $zip
82+
83+
- name: Upload workflow artifact
84+
uses: actions/upload-artifact@v4
85+
with:
86+
name: ProcessBusInsight-v${{ steps.version.outputs.value }}-win-x64-portable
87+
path: |
88+
artifacts/release/ProcessBusInsight-v${{ steps.version.outputs.value }}-win-x64-portable.zip
89+
artifacts/release/SHA256SUMS.txt
90+
if-no-files-found: error
91+
92+
- name: Publish GitHub Release
93+
if: ${{ github.event_name == 'push' || github.event.inputs.publish_release == 'true' }}
94+
shell: pwsh
95+
env:
96+
GH_TOKEN: ${{ github.token }}
97+
run: |
98+
$version = '${{ steps.version.outputs.value }}'
99+
$tag = "v$version"
100+
$zip = "artifacts/release/ProcessBusInsight-v$version-win-x64-portable.zip"
101+
$sha = "artifacts/release/SHA256SUMS.txt"
102+
$notesFile = '${{ github.event.inputs.release_notes_file }}'
103+
if ([string]::IsNullOrWhiteSpace($notesFile)) { $notesFile = 'docs/RELEASE_NOTES_v1.2.0.md' }
104+
if (-not (Test-Path $notesFile)) { $notesFile = 'docs/RELEASE_NOTES_v1.2.0.md' }
105+
if (-not (Test-Path $notesFile)) { throw "Release notes file not found: $notesFile" }
106+
107+
$releaseArgs = @('release','create',$tag,$zip,$sha,'--title',"Process Bus Insight $tag",'--notes-file',$notesFile,'--target','${{ github.sha }}')
108+
109+
$isDraft = '${{ github.event.inputs.draft }}'
110+
$isPrerelease = '${{ github.event.inputs.prerelease }}'
111+
if ('${{ github.event_name }}' -eq 'push') { $isPrerelease = 'false' }
112+
if ($isDraft -eq 'true') { $releaseArgs += '--draft' }
113+
if ($isPrerelease -eq 'true') { $releaseArgs += '--prerelease' }
114+
115+
gh release view $tag *> $null
116+
if ($LASTEXITCODE -eq 0) {
117+
gh release upload $tag $zip $sha --clobber
118+
}
119+
else {
120+
gh @releaseArgs
121+
}

.gitignore

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
################################################################################
2-
# Source-only repository hygiene
2+
# Source repository hygiene
33
################################################################################
44

55
# IDE / editor state
@@ -19,17 +19,23 @@ bin/
1919
obj/
2020
**/bin/
2121
**/obj/
22+
out/
2223
artifacts/
2324
installer/
2425
publish/
26+
release/
2527

26-
# .NET local state
28+
# .NET local state and packages
2729
.dotnet/
2830
.dotnet-cli/
2931
.dotnet-home/
3032
.dotnet-home-build/
3133
*.nupkg
3234
*.snupkg
35+
TestResults/
36+
coverage/
37+
coverage.*
38+
*.trx
3339

3440
# Native / Visual C++ generated files
3541
*.ipch
@@ -53,16 +59,36 @@ UpgradeLog*.htm
5359
*.cache
5460
*.log
5561

62+
# Local configuration / secrets
63+
.env
64+
.env.*
65+
*.pfx
66+
*.snk
67+
secrets.json
68+
appsettings.Development.json
69+
5670
# Local capture/runtime state
5771
*.last_interface.txt
5872
*.pcap
5973
*.pcapng
6074
*.etl
75+
captures/
76+
logs/
77+
temp/
78+
tmp/
6179

62-
# Local generated media / reports
80+
# Local generated reports/media
6381
*.pdf
6482
*.gif
6583
docs/screenshot/*.png
6684

67-
# Codex/browser local state
85+
# Node/web outputs if a future site toolchain is added
86+
node_modules/
87+
dist/
88+
build/
89+
.parcel-cache/
90+
.vite/
91+
92+
# Local automation/browser state
6893
.codex/
94+
.playwright/

.nojekyll

Whitespace-only changes.

AGENTS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,3 +249,19 @@ Required behavior:
249249
- Missing expected streams and unexpected live streams are both important commissioning evidence.
250250
- Binding matrix selection should drive the semantic inspector so the engineer can move from finding to evidence quickly.
251251
- Never silently auto-correct semantic mapping. Show evidence and confidence.
252+
253+
## Public Repository Packaging Rule
254+
255+
Public-facing repo work must keep README, landing page, release notes, and package quick-start material written for users who want to understand, download, run, build, and contribute.
256+
257+
Do not write public docs as internal audit notes. Avoid wording such as "owner should", "next step for maintainer", or "audit found" in README, landing page, package notes, or release body.
258+
259+
For Windows desktop releases, keep the portable package flow working:
260+
261+
```text
262+
scripts/publish-windows-portable.ps1
263+
scripts/verify-release-package.ps1
264+
.github/workflows/release-package.yml
265+
```
266+
267+
The package should contain the published app, quick-start note, license, notice files, third-party notices, and a convenience launcher only when it helps desktop users run the app.

CONTRIBUTING.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Contributing to Process Bus Insight
2+
3+
Thank you for helping improve Process Bus Insight.
4+
5+
This project is intended to stay receive-only, raw-passive, evidence-focused, and honest about timing confidence.
6+
7+
## Good contribution areas
8+
9+
- SV, GOOSE, and PTP decoder coverage.
10+
- SCL examples and parser improvements.
11+
- Validation scenarios for FAT/SAT workflows.
12+
- UI clarity and evidence wording.
13+
- Documentation, troubleshooting notes, and field checklists.
14+
- Automated tests for protocol parsers and edge cases.
15+
16+
## Product boundaries
17+
18+
Please keep these boundaries intact:
19+
20+
- Do not add IEC 61850 control workflows to the product app.
21+
- Do not make timing claims beyond the timestamp source quality.
22+
- Do not vendor restricted third-party binaries without license review.
23+
- Do not add sample captures that expose private customer/project data.
24+
25+
## Pull request checklist
26+
27+
Before opening a pull request:
28+
29+
1. Build the solution in Release mode.
30+
2. Confirm the app still starts on Windows.
31+
3. Keep README and docs user-facing.
32+
4. Add or update validation notes when behavior changes.
33+
5. Avoid committing `bin`, `obj`, `artifacts`, captures, logs, or local settings.
34+
35+
## Development setup
36+
37+
```powershell
38+
git clone https://github.com/masarray/DigSubAnalyzer.git
39+
cd DigSubAnalyzer
40+
dotnet restore .\ProcessBusSuite.sln
41+
dotnet build .\ProcessBusSuite.sln -c Release
42+
```

Directory.Build.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,11 @@
66
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
77
<RepositoryType>git</RepositoryType>
88
<NeutralLanguage>en</NeutralLanguage>
9+
<VersionPrefix>1.2.0</VersionPrefix>
10+
<VersionSuffix>public-beta</VersionSuffix>
11+
<PackageVersion>1.2.0-public-beta</PackageVersion>
12+
<AssemblyVersion>1.2.0.0</AssemblyVersion>
13+
<FileVersion>1.2.0.0</FileVersion>
14+
<InformationalVersion>1.2.0-public-beta</InformationalVersion>
915
</PropertyGroup>
1016
</Project>

NOTICE

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Process Bus Insight / DigSubAnalyzer
2+
Copyright 2026 Process Bus Insight Contributors
3+
4+
This product includes source code licensed under the Apache License, Version 2.0.
5+
6+
Npcap is a runtime prerequisite for raw packet capture on Windows. Npcap is not vendored in this repository and must be installed separately by the user.

0 commit comments

Comments
 (0)