Build / build (push) Skipped
Build / package (push) Skipped
Build / build (pull_request) Successful in 1m37s
Reusable / Qodana / Qodana (pull_request) Successful in 3m5s
Qodana / qodana (pull_request) Successful in 3m5s
Security / workflow-lint (pull_request) Successful in 6s
Reusable / Security / Rust (cargo-deny) (pull_request) Skipped
Reusable / Security / Secrets (gitleaks) (pull_request) Successful in 9s
Reusable / Security / SAST (Opengrep) (pull_request) Successful in 15s
Reusable / Security / Dependencies (osv-scanner) (pull_request) Successful in 12s
Reusable / Security / .NET (NuGetAudit) (pull_request) Successful in 40s
Security / scan (pull_request) Successful in 1m18s
Build / package (pull_request) Successful in 1m22s
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>
82 lines
4.8 KiB
Markdown
82 lines
4.8 KiB
Markdown
# Releasing CommandForge
|
|
|
|
Releases are automated by [`release.yml`](.gitea/workflows/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](https://git.poli0981.dev/poli0981/CommandForge/releases). The forge itself stores no
|
|
binaries.
|
|
|
|
## Steps
|
|
|
|
1. Make sure `main` is green and contains everything for the release.
|
|
2. Choose a SemVer version `X.Y.Z`. In a pull request, move the `[Unreleased]` notes in
|
|
[CHANGELOG.md](CHANGELOG.md) under `## [X.Y.Z] — <date>`, add the compare link at the bottom,
|
|
and set `<Version>` in `Directory.Build.props` to `X.Y.Z` (the workflow refuses a tag that
|
|
doesn't match it). Merge it.
|
|
3. 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's `r2-release` artifact.
|
|
4. Tag the merge commit on `main` with a **signed, annotated** tag and push it:
|
|
|
|
```bash
|
|
git switch main && git pull
|
|
git tag -s vX.Y.Z -m "CommandForge X.Y.Z"
|
|
git push origin vX.Y.Z
|
|
```
|
|
|
|
5. 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**, **`SHA256SUMS`** and the release notes (this version's section
|
|
of `CHANGELOG.md` plus the download links) with `scripts/release-assets.ps1`;
|
|
- if `VT_API_KEY` is set, submits `Setup.exe` and 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 `SHA256SUMS` and `sbom.cdx.json` under `commandforge/X.Y.Z/` (the ops repo's
|
|
`publish-r2.yml`; a file there is never overwritten);
|
|
- creates the Gitea release `vX.Y.Z` with the notes and the links;
|
|
- calls the shared announcer (`poli0981/.github`) to post the release to Discord.
|
|
6. Check the [release page](https://git.poli0981.dev/poli0981/CommandForge/releases) and the
|
|
files, for example:
|
|
|
|
```powershell
|
|
curl.exe -sI https://releases.poli0981.dev/commandforge/releases.win.json
|
|
curl.exe -s https://releases.poli0981.dev/commandforge/X.Y.Z/SHA256SUMS
|
|
```
|
|
|
|
Edit 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](.github/SECURITY.md).
|