vpk pack writes assets.win.json locally, but vpk upload s3 publishes only the packages, the installer, the portable zip, releases.win.json and RELEASES (seen on the 2.3.0 release). The VirusTotal key the 2.3.0 release used is a user-level secret, so RELEASING.md no longer says it must be on the repository. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4.8 KiB
Releasing CommandForge
Releases are automated by release.yml on Gitea Actions,
triggered by pushing a signed SemVer tag. The files go to Cloudflare R2
(https://releases.poli0981.dev/commandforge/), the notes and links to a release on
Gitea. The forge itself stores no
binaries.
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.propstoX.Y.Z(the workflow refuses a tag that doesn't match it). Merge it. -
Optional dry run: Actions → Release → Run workflow on
main. It builds, packs, writes the SBOM, checksums and notes, and reads the previous release from R2 (which checks the R2 credentials), but uploads nothing; the files stay as the run'sr2-releaseartifact. -
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.Z -
The Release workflow runs on the Windows runner (host mode on the maintainer's PC) and:
- checks that the tag matches
<Version>; - restores the pinned tools (
vpk, CycloneDX) and downloads the previous release from R2 (vpk download s3) so a delta package can be computed; - publishes and packages with Velopack (
scripts/pack.ps1); - writes the CycloneDX SBOM,
SHA256SUMSand the release notes (this version's section ofCHANGELOG.mdplus the download links) withscripts/release-assets.ps1; - if
VT_API_KEYis set, submitsSetup.exeand the full package to VirusTotal and adds the report links to the notes; - uploads to R2 with
vpk upload s3: packages, installer and portable zip first, the feed (releases.win.json,RELEASES) last, keeping the ten newest releases; installed copies see the update from that moment; - checks that the feed, the installer, the portable zip and the full package answer
200; - puts
SHA256SUMSandsbom.cdx.jsonundercommandforge/X.Y.Z/(the ops repo'spublish-r2.yml; a file there is never overwritten); - creates the Gitea release
vX.Y.Zwith the notes and the links; - calls the shared announcer (
poli0981/.github) to post the release to Discord.
- checks that the tag matches
-
Check the release page and the files, for example:
curl.exe -sI https://releases.poli0981.dev/commandforge/releases.win.json curl.exe -s https://releases.poli0981.dev/commandforge/X.Y.Z/SHA256SUMSEdit the notes on the release page if you want a shorter summary (keep the download links, the checksums and the VirusTotal section).
A versioned file on R2 is never replaced. If a release fails after its packages were uploaded, fix the cause and release the next patch version rather than re-tagging.
Secrets and variables
| Name | Kind | Where | Used for |
|---|---|---|---|
R2_RELEASES_ACCESS_KEY_ID, R2_RELEASES_SECRET_ACCESS_KEY |
secret | user level (Gitea → Settings → Actions) | vpk download/upload s3 and publish-r2.yml: an R2 API token with Object Read & Write on poli0981-releases only |
R2_ACCOUNT_ID |
variable | user level | The R2 endpoint (https://<id>.r2.cloudflarestorage.com) |
GITEA_TOKEN (github.token) |
automatic | Create the Gitea release; read it for the announcement | |
VT_API_KEY |
secret | user or repository level | VirusTotal scan + links (optional; skipped if unset) |
DISCORD_RELEASES_WEBHOOK (or DISCORD_REPO_WEBHOOK) |
secret | repository | Release announcement to Discord |
DISCORD_PING_ROLE_ID |
secret | repository | Role ping on stable releases (optional) |
DISCORD_RELEASE_PIPELINE_WEBHOOK |
secret | repository | Result of every Release run |
DISCORD_CI_WEBHOOK |
secret | repository | Build / Qodana / Security failures on main |
QODANA_TOKEN |
secret | repository | Qodana Cloud project token; selects the Ultimate licence (qodana.yml) |
Release credentials are only ever used by release.yml, which runs on a tag or a manual
dispatch, never on a pull request or a schedule.
Code signing
Not done yet: releases ship without an Authenticode signature, so users may see a SmartScreen
"unknown publisher" warning. Mitigations: SHA-256 checksums, an SBOM, VirusTotal, public build
logs, 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.