Automatic Analysis can't import coverage, so SonarCloud now runs from sonarcloud.yml: the SonarScanner for .NET 12.0.0 (pinned as a local tool next to vpk, updated by Dependabot's build-tooling group) wraps a Release build and an OpenCover test run. - A token job checks for SONAR_TOKEN, so fork and Dependabot pull requests are skipped without trusting actor or repository names. - The project version is passed to the scanner, so the "previous version" new-code period resets at each release (and now, instead of judging the whole 2.0.0 rewrite as new code). - Roslyn rules stay enforced by the warnings-as-errors build and aren't imported as external issues; XAML code-behind and the two Program.cs entry points are left out of coverage. - .sonarcloud.properties (read only by Automatic Analysis) is removed; its exclusions move to the scanner arguments. - CI failure alerts also cover the SonarCloud workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3.6 KiB
Releasing CommandForge
Releases are automated by release.yml, triggered by pushing a
SemVer tag.
Steps
-
Make sure
mainis green and contains everything for the release. -
Choose a SemVer version
X.Y.Z. In a pull request, move the[Unreleased]notes in CHANGELOG.md under## [X.Y.Z] — <date>, add the compare link at the bottom, and set<Version>inDirectory.Build.props(the dev-build default; the release build stamps the tag's version anyway). Merge it. -
Tag the merge commit on
mainwith a signed, annotated tag and push it:git switch main && git pull git tag -s vX.Y.Z -m "CommandForge X.Y.Z" git push origin vX.Y.ZThe
release tagsruleset protectsv*tags: once pushed, a release tag can't be moved or deleted (only a repository admin can bypass this). -
The Release workflow runs on
windows-latestand:- resolves the version from the tag (
vX.Y.Z→X.Y.Z); - restores the pinned
vpktool and downloads the previous release so a delta package can be computed; - publishes and packages with Velopack (
scripts/pack.ps1); - creates build-provenance attestations for
Setup.exe, the portable zip and this version's.nupkgfiles; - uploads everything as a draft GitHub Release, attaches the SPDX SBOM
(
sbom.spdx.json) andchecksums.txt(SHA-256 of every published asset), sets the release notes to this version's section ofCHANGELOG.md, then publishes it as the latest release — installed copies only see the update once every asset is in place; - if
VT_API_KEYis set, submitsSetup.exeand the full package to VirusTotal and appends the scan links to the release notes; - calls the shared announcer (
poli0981/.github) to post the release to Discord.
- resolves the version from the tag (
-
Check the release page: the assets are all there, and the attestation verifies:
gh release download vX.Y.Z --pattern "*-Setup.exe" gh attestation verify CommandForge-win-Setup.exe --repo poli0981/CommandForgeThe notes are the CHANGELOG section followed by the VirusTotal links; edit them on the release page if you want a shorter summary (keep the VirusTotal section). The SHA-256 sums are in
checksums.txt.
You can also run the workflow manually (Actions → Release → Run workflow) with a version
input; the upload step then creates the vX.Y.Z tag.
Repository secrets
| Secret | Used for | Required |
|---|---|---|
GITHUB_TOKEN |
Create the release, upload assets, read the SBOM | automatic |
VT_API_KEY |
VirusTotal scan + links | optional (step skipped if unset) |
DISCORD_RELEASES_WEBHOOK (or DISCORD_REPO_WEBHOOK) |
Release announcement to Discord | optional |
DISCORD_PING_ROLE_ID |
Role ping on stable releases | optional |
DISCORD_CI_WEBHOOK |
Build/SonarCloud failure alerts to Discord | optional |
SONAR_TOKEN |
SonarCloud analysis and coverage (sonarcloud.yml) |
for the SonarCloud workflow (runs without it are skipped) |
poli0981is a user account (not an org), so secrets are set per repository (Settings → Secrets and variables → Actions).
Code signing
Not done yet: releases ship without an Authenticode signature, so users may see a SmartScreen
"unknown publisher" warning. Mitigations: build-provenance attestations, SHA-256 checksums, an
SBOM, VirusTotal, no obfuscation, and public source. When Azure Trusted Signing (or SignPath
Foundation) is configured, add a signing step between dotnet publish and vpk pack in
scripts/pack.ps1, and update SECURITY.md.