Skip to content

Commit 26fc59f

Browse files
committed
Fix Windows portable release workflow
1 parent 7ad15ec commit 26fc59f

5 files changed

Lines changed: 52 additions & 2 deletions

File tree

.github/workflows/release-package.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ jobs:
4949
with:
5050
dotnet-version: 8.0.x
5151

52+
- name: Show .NET SDK selection
53+
run: dotnet --info
54+
5255
- name: Resolve release version
5356
id: version
5457
shell: pwsh

docs/RELEASE_NOTES_v1.2.1.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Release Notes — v1.2.1-landing-and-release-fix
2+
3+
This maintenance release improves the public landing page and fixes the Windows portable release workflow.
4+
5+
## Highlights
6+
7+
- Premium GitHub Pages landing page refresh with cleaner typography, stronger screenshot presentation, app-icon branding, favicon, scroll reveal animation, and product trailer section.
8+
- Windows portable release script now avoids command-line `AssemblyName` overrides so referenced projects keep their own assembly names during restore and publish.
9+
- The release workflow pins the repository to the .NET 8 SDK through `global.json` and prints `dotnet --info` for easier CI diagnosis.
10+
- The portable package remains a self-contained single-EXE app payload by default.
11+
12+
## Recommended package
13+
14+
Download the portable Windows package from GitHub Releases:
15+
16+
```text
17+
ProcessBusInsight-v1.2.1-landing-and-release-fix-win-x64-portable.zip
18+
SHA256SUMS.txt
19+
```
20+
21+
Npcap is required on the target Windows machine and is not bundled with the application.

docs/RELEASE_PACKAGING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,7 @@ Manual inputs:
4646
## Runtime prerequisite
4747

4848
Npcap is required on the target Windows machine and is not bundled in the repository.
49+
50+
## CI restore note
51+
52+
The portable release script performs a runtime-specific restore and then publishes with `--no-restore`. It intentionally does not pass `/p:AssemblyName=...` on the command line because MSBuild global properties also flow into referenced projects. Passing the same assembly name into the whole project graph can make NuGet restore report `Ambiguous project name`.

global.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"sdk": {
3+
"version": "8.0.100",
4+
"rollForward": "latestFeature",
5+
"allowPrerelease": false
6+
}
7+
}

scripts/publish-windows-portable.ps1

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,23 @@ Remove-Item -LiteralPath $publishDir -Recurse -Force -ErrorAction SilentlyContin
3535
Remove-Item -LiteralPath $stageDir -Recurse -Force -ErrorAction SilentlyContinue
3636
New-Item -ItemType Directory -Path $publishDir, $stageDir, $releaseDir | Out-Null
3737

38+
$resolvedProjectPath = (Resolve-Path $ProjectPath).Path
39+
40+
# Runtime-specific restore is done explicitly, then publish runs with --no-restore.
41+
# Do not pass /p:AssemblyName from the command line. MSBuild global properties flow into
42+
# project references too, which can make every project in the graph look like the same
43+
# project name to NuGet restore and trigger: Ambiguous project name 'ProcessBusInsight'.
44+
$restoreArgs = @(
45+
"restore", $resolvedProjectPath,
46+
"-r", $Runtime,
47+
"/p:ContinuousIntegrationBuild=true"
48+
)
49+
50+
dotnet @restoreArgs
51+
3852
$publishArgs = @(
39-
"publish", $ProjectPath,
53+
"publish", $resolvedProjectPath,
54+
"--no-restore",
4055
"-c", $Configuration,
4156
"-r", $Runtime,
4257
"-o", $publishDir,
@@ -46,7 +61,7 @@ $publishArgs = @(
4661
"/p:PublishTrimmed=false",
4762
"/p:DebugType=None",
4863
"/p:DebugSymbols=false",
49-
"/p:AssemblyName=$AppName"
64+
"/p:ErrorOnDuplicatePublishOutputFiles=true"
5065
)
5166

5267
if ($selfContained) {

0 commit comments

Comments
 (0)