Skip to content

Release Process

Andrei edited this page Jul 21, 2026 · 1 revision

Release Process

This repo ships four independently versioned things. Each has its own channel; bumping one never requires releasing the others.

What ships Version lives in How to release What comes out
HSM Server (zip + Docker image) <Version> in HSMServer.csproj Run the HSMServer build workflow manually Tag server-v*, GitHub Release with zip, Docker image on Docker Hub
HSM Agent (hsm-agent.exe) project(HsmAgent VERSION …) in src/agent/CMakeLists.txt Push a tag agent-v<version> GitHub Release with the exe + SHA-256
HSMDataCollector (C#, NuGet) Collector .csproj Run the Collector nuget build workflow Package on nuget.org
Native C++ collector (hsm::collector) src/native/collector CMake (4 synced places) Push a tag collector-v<version> In-repo vcpkg registry update (auto-PR)

HSM Server

  1. Bump <Version> first. ⚠ The release workflow force-pushes its tag and updates an existing release in place — dispatching it without a bump silently overwrites the previous release under the same number.
  2. Go to Actions → HSMServer build → Run workflow on master, choose PreRelease:
    • PreRelease = false — full release: the GitHub Release is public-normal and the Docker :latest tag moves to this version. Everyone running docker compose pull gets it.
    • PreRelease = true — the release is marked pre-release and :latest does not move; the image is pushed only as :<version>. Test stands must pin the version tag explicitly.
  3. The workflow does the rest: builds + tests, downloads the pinned HSM Agent release into wwwroot/agent/ (nothing is compiled from C++ — see the Agent section), publishes the zip release under tag server-v<version>, and pushes the Docker image. Guards fail the run if the agent binary is missing from the publish output or from the image layer.

Verify: the Releases page shows HSMServer v<version> with the zip, Latest badge sits on a server release, and on a deployed build the product page's Download agent button returns a zip (not an error toast).

HSM Agent

The agent version is the self-update delivery key: deployed agents upgrade only to a strictly greater version. Full rules: src/agent/AGENTS.md.

  1. In the PR that changes the agent (including collector changes that are compiled into it), bump project(HsmAgent VERSION x.y.z). Merge it.
  2. Push the matching tag: git tag agent-vx.y.z && git push origin agent-vx.y.z. The agent-release workflow refuses a tag that doesn't equal the CMake version, builds with warnings-as-errors, runs the test suite and a real Windows-service smoke, then publishes the release HSM Agent x.y.z with hsm-agent.exe + hsm-agent.exe.sha256. Agent releases never take the repo's Latest badge (guarded automatically).
  3. Ship it to servers with a one-line PR bumping src/server/HSMServer/agent-release.txt. Every server build from that point carries the new agent; already-deployed agents pick it up through self-update where the server has auto-update enabled.

Re-running the tag workflow is safe: a complete existing release is skipped; a half-published one stops the lane with an explicit "delete and re-run" message.

Verify: the release has both assets, and GET /api/agent/version on a freshly built server reports the new version.

HSMDataCollector (C#) → NuGet

Bump the collector version in its .csproj (patch/minor per change policy), merge, then run Actions → Collector nuget build — it packs and pushes to nuget.org. HSMObjects nuget build works the same way for the shared objects package.

Native C++ collector → vcpkg registry

Covered in detail by docs/releasing-hsm-collector.md. Short form: the version is declared in four synced places (CI fails on drift); after the bump PR merges, push collector-v<version> — the registry-publish workflow computes hashes, updates ports/ + versions/, and opens an auto-PR. Run the Windows consumer check on that PR, then merge it. Consumers install with vcpkg install hsm-collector.


Who can release

Any maintainer with push access: tags and workflow dispatches use repo permissions; Docker Hub and nuget.org credentials live in the repo's Actions secrets — nothing is published from a developer machine.

Clone this wiki locally