Workflows (.github/workflows/): - build.yml: Windows restore + dotnet format --verify + Release build (0-warning gate) + tests, on PR/push to main. - codeql.yml: project-specific CodeQL C# (Windows, builds CommandForge.slnx). The shared reusable codeql-csharp.yml runs on Linux and expects a .sln, so it cannot build this WPF/.slnx app. - release.yml: on tag v*, install vpk, download the previous release for the delta base (continue-on-error on first release), publish self-contained + vpk pack, publish the GitHub Release (vpk upload github), attach SHA-256 checksums.txt, and optionally submit to VirusTotal (gated on VT_API_KEY). - announce-release.yml + notify-ci-failure.yml: thin callers of the reusable Discord workflows in poli0981/.github (secrets: inherit). - dependabot.yml: weekly nuget + github-actions updates. Fix: scripts/pack.ps1 now passes -p:Version/-p:InformationalVersion to dotnet publish, so the in-app "App version" matches the release tag instead of defaulting to 1.0.0. Docs (English, public): BUILD.md, RELEASING.md, UPDATES.md — including the Velopack update mechanism (first vs subsequent release and how deltas are produced) and the required repo secrets. No source changes; 0-warning Release build, 104 tests pass; actionlint clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
56 lines
1.9 KiB
PowerShell
56 lines
1.9 KiB
PowerShell
#requires -Version 7
|
|
<#
|
|
.SYNOPSIS
|
|
Publishes CommandForge self-contained and packages it with Velopack (vpk) for GitHub Releases.
|
|
|
|
.DESCRIPTION
|
|
Phase 4 release helper (no CI — that is Phase 6). Produces, under Releases/:
|
|
CommandForge-win-Setup.exe, RELEASES, *-full.nupkg, *-delta.nupkg
|
|
Update is per-user (no UAC). The Elevator is copied into the publish dir by the
|
|
CopyElevatorOnPublish MSBuild target, so vpk packages it automatically.
|
|
|
|
.PARAMETER Version
|
|
SemVer package version, e.g. 0.3.0 (no leading 'v'). Should match the git tag vX.Y.Z.
|
|
|
|
.EXAMPLE
|
|
./scripts/pack.ps1 -Version 0.3.0
|
|
#>
|
|
[CmdletBinding()]
|
|
param(
|
|
[Parameter(Mandatory = $true)]
|
|
[string] $Version,
|
|
|
|
[string] $Runtime = 'win-x64',
|
|
|
|
[string] $Configuration = 'Release'
|
|
)
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
$repoRoot = Split-Path -Parent $PSScriptRoot
|
|
$publishDir = Join-Path $repoRoot "publish/$Runtime"
|
|
$wpfProject = Join-Path $repoRoot 'src/CommandForge.Wpf'
|
|
|
|
Write-Host "Publishing CommandForge $Version ($Runtime, $Configuration)..." -ForegroundColor Cyan
|
|
# Stamp the assembly version so the in-app "App version" (Settings -> About, Report Bug) matches
|
|
# the released package version; otherwise it stays at the 1.0.0 default regardless of the tag.
|
|
dotnet publish $wpfProject `
|
|
-c $Configuration -r $Runtime --self-contained true `
|
|
-p:PublishSingleFile=false `
|
|
-p:Version=$Version -p:InformationalVersion=$Version `
|
|
-o $publishDir
|
|
|
|
# vpk is the Velopack CLI: dotnet tool install -g vpk
|
|
if (-not (Get-Command vpk -ErrorAction SilentlyContinue)) {
|
|
throw "vpk not found. Install it with: dotnet tool install -g vpk"
|
|
}
|
|
|
|
Write-Host "Packing with Velopack..." -ForegroundColor Cyan
|
|
vpk pack `
|
|
--packId CommandForge `
|
|
--packVersion $Version `
|
|
--packDir $publishDir `
|
|
--mainExe CommandForge.Wpf.exe
|
|
|
|
Write-Host "Done. Artifacts are in $(Join-Path $repoRoot 'Releases')." -ForegroundColor Green
|