Skip to content

Commit 1a7e37e

Browse files
authored
update release docs (#78)
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
1 parent 6e5ea92 commit 1a7e37e

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

docs/RELEASING.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ git push origin v0.1.1
4949

5050
The [publish workflow](../.github/workflows/publish.yml) automatically:
5151

52-
1. Runs tests on all hypervisors (KVM, MSHV, WHP)
53-
2. Publishes npm package to [npmjs.org](https://www.npmjs.com/package/@hyperlight-dev/hyperagent) with [npm provenance](https://docs.npmjs.com/generating-provenance-statements) via OIDC trusted publishing
54-
3. Publishes Docker image to GitHub Container Registry (`ghcr.io/hyperlight-dev/hyperagent`)
52+
1. Builds native addons on Linux (KVM, glibc + musl) and Windows (WHP) self-hosted runners; runs tests on the KVM and WHP builds (musl is cross-compiled so it can't execute on the glibc host).
53+
2. Packs a single cross-platform npm tarball on a self-hosted runner (needs the hyperlight toolchain), then publishes it from a **github-hosted** runner with [npm provenance](https://docs.npmjs.com/generating-provenance-statements) via OIDC trusted publishing. npm's sigstore backend rejects provenance from self-hosted runners (`E422 Unsupported GitHub Actions runner environment`), which is why the pack and publish steps are split.
54+
3. Publishes a Docker image to GitHub Container Registry (`ghcr.io/hyperlight-dev/hyperagent`).
5555

5656
#### npm Trusted Publishing
5757

@@ -118,7 +118,13 @@ The version is displayed:
118118
- Via `--version` / `-v` flag
119119
- In the startup banner
120120

121-
The version is injected at build time via esbuild's `--define` flag. In development mode (running via `tsx`), it's calculated from git at runtime.
121+
It is injected into the binary at build time via esbuild's `--define` flag from `scripts/build-binary.js`:
122+
123+
- **Release / dispatch builds**: the workflow sets `VERSION=<tag or input>` (e.g. `v0.2.1`). The build script strips a leading `v` and uses that exact string.
124+
- **Local / dev builds (`VERSION` unset)**: calculated from `git describe --tags --long --always --dirty` using the MinVer-style rules in the table above.
125+
- **`tsx` / dev mode (no compile step)**: the same git-describe fallback runs at startup.
126+
127+
The npm tarball's `package.json` version comes from a separate step: `npm version <tag> --no-git-tag-version --allow-same-version` just before `npm pack`. `npm version` normalises semver input, so `v0.2.1` is written as `0.2.1` without any explicit stripping on our side.
122128

123129
## Troubleshooting
124130

0 commit comments

Comments
 (0)