249
250
## Releasing
251
252
-Version lives in `Cargo.toml`. The binary is published to six registries via separate workflows
253
-(`release-crates`, `release-github`, `release-homebrew`, `release-npm`, `release-nuget`,
254
-`release-pypi`); the `npm/`, `nuget/`, and `pypi/` dirs hold the wrapper-package templates. Update
255
-`CHANGELOG.md` for releases.
252
+Version lives in `Cargo.toml`. Update `CHANGELOG.md` for releases.
253
+
254
+Publishing splits into two groups. **Language registries** each get their own tag-triggered
255
+workflow: `release-crates`, `release-npm`, `release-nuget`, `release-pypi`. The `npm/`, `nuget/`,
256
+and `pypi/` dirs hold their wrapper-package templates.
257
+
258
+**OS package managers** all publish somewhere outside this repo and all need checksums from the
259
+GitHub release, so `release-github` builds the binaries, attaches the assets, and then dispatches
260
+`release-homebrew`, `release-scoop`, `release-winget`, and `release-aur`. A dispatch failure in one
261
+is logged as a warning rather than failing the others, so an unconfigured channel does not block a
262
+release. Their inputs live in `packaging/`.
263
+
264
+Every release asset now carries a `.sha256` sidecar, not just the macOS Homebrew tarball. Scoop,
265
+winget, and the AUR PKGBUILD each need one, and they consume the raw binaries rather than the
266
+tarball. `release-github` also builds a `.deb` and `.rpm` per Linux target with nfpm
267
+(`packaging/nfpm.yaml`), packaging the already-built binary rather than re-invoking cargo.
268
+
269
+Three of these need credentials or a one-time manual step before they work:
270
+
271
+- Scoop needs a `getsigit/scoop-bucket` repo and a `SCOOP_BUCKET_TOKEN` secret, mirroring the
272
+ Homebrew tap setup.
273
+- winget needs a `WINGET_TOKEN` (PAT with `public_repo`) so `wingetcreate` can fork
274
+ `microsoft/winget-pkgs`. The workflow only handles *updates*; the first submission has to be made
275
+ by hand with `wingetcreate new`, since a package must exist before it can be updated.
276
+- The AUR needs `AUR_USERNAME`, `AUR_EMAIL`, and `AUR_SSH_PRIVATE_KEY`. It publishes `sigit-bin`
277
+ (a prebuilt binary) so Arch users are not compiling the on-device inference stack to install a
278
+ CLI.
279
280
`[profile.release]` sets `strip = "symbols"` because binary size is a distribution constraint, not
258
-just a nicety — see the NuGet note below.
281
+just a nicety. See the NuGet note below.
282
283
The NuGet package (`SiGit.Code`, installed with `dotnet tool install --global SiGit.Code`) is the
261
-odd one out: npm and PyPI publish one artifact per platform, but a .NET tool is a single package,
262
-so `nuget/sigit/` bundles all six binaries under `native/<os>-<arch>/` and a small managed shim
263
-(`Program.cs`) execs the right one. That shim leaves stdin/stdout/stderr unredirected on purpose,
264
-since siGit Code chooses TUI or ACP mode by testing whether stdin is a TTY.
284
+odd one out among the language registries: npm and PyPI publish one artifact per platform, but a
285
+.NET tool is a single package, so `nuget/sigit/` bundles all six binaries under
286
+`native/<os>-<arch>/` and a small managed shim (`Program.cs`) execs the right one. That shim leaves
287
+stdin/stdout/stderr unredirected on purpose, since siGit Code chooses TUI or ACP mode by testing
288
+whether stdin is a TTY. It also sets `RollForward=Major`: it targets `net8.0`, and without that a
289
+machine carrying only the .NET 10 runtime installs a tool that refuses to start.
290
291
Bundling every target means the package is large, so `release-nuget.yml` fails the pack job if the
292
`.nupkg` crosses nuget.org's 250 MB limit. At v1.5.1 it lands around 160 MB. If a future release
293
trips that check, the fix is not to drop targets but to split into RID-specific tool packages
269
-(.NET 10's `DotnetToolRidPackage`), which ship one binary per platform the way npm already does —
270
-that also needs a fallback package for pre-.NET-10 SDKs.
294
+(.NET 10's `DotnetToolRidPackage`), which ship one binary per platform the way npm already does.
295
+That also needs a fallback package for pre-.NET-10 SDKs.