ci(sidecar): automated build + release workflow (Gitea Actions) #2

Merged
whitlocktech merged 3 commits from ci/sidecar-release into main 2026-07-14 16:46:09 +00:00
Member

Adds automated CI/CD for the Rust sidecar: build, cross-compile, and release on every push to main.

What it does

.gitea/workflows/release.yml — on push to main:

  1. Plan (language-agnostic release engine) — computes the next version from conventional-commit subjects since the last v* tag:
    • feat!: / BREAKING CHANGEmajor, feat:minor, fix:/perf:patch, nothing releasable → no release.
    • First run (no tag yet) ships the current Cargo.toml version as-is (v0.1.0).
    • Builds a grouped changelog.
  2. Rust adapter (isolated build steps) — installs the toolchain + x86_64-pc-windows-gnu target + gcc-mingw-w64-x86-64, sets the crate version, runs cargo fmt --checkcargo test, builds x86_64-unknown-linux-gnu, and cross-builds the Windows .exe via MinGW (libsqlite3-sys bundled is the only native dep — no openssl/ring/rustls, so cross-compile is the easy case).
  3. Packageuo-link-sidecar-linux-x86_64, uo-link-sidecar-windows-x86_64.exe, SHA256SUMS.
  4. Release (engine) — commits chore(release): bump version to vX.Y.Z [skip ci], tags, pushes, then creates the Gitea release and uploads the three assets.

The engine/adapter split keeps the release automation language-agnostic (consumes only {version, changelog, artifacts}) so it can be retargeted at C#/Node/Docker/static projects later — only the Rust adapter steps are Rust-specific.

Also includes a style(sidecar): apply rustfmt commit so the new cargo fmt --check gate passes on the first run (formatting only, no behavior change).

Prerequisites before this can cut a release

  • Secrets (already named to match the site's image build): REGISTRY_USER / REGISTRY_TOKEN. The token additionally needs write:repository scope (push the bump commit + tag, create the release) on top of the write:package it had.
  • main must accept a direct push from that user (no blocking branch protection), since the version-bump commit lands on main. The bump commit carries [skip ci] so it does not re-trigger the workflow.

Note on this diff

This branch is based on feature/admin-controls, so until PR #1 merges, this PR also shows those admin commits. Merging PR #1 first will collapse this down to just the rustfmt + CI commits.

🤖 Generated with Claude Code

Adds automated CI/CD for the Rust sidecar: build, cross-compile, and release on every push to `main`. ## What it does `.gitea/workflows/release.yml` — on push to `main`: 1. **Plan (language-agnostic release engine)** — computes the next version from conventional-commit subjects since the last `v*` tag: - `feat!:` / `BREAKING CHANGE` → **major**, `feat:` → **minor**, `fix:`/`perf:` → **patch**, nothing releasable → **no release**. - First run (no tag yet) ships the current `Cargo.toml` version as-is (`v0.1.0`). - Builds a grouped changelog. 2. **Rust adapter (isolated build steps)** — installs the toolchain + `x86_64-pc-windows-gnu` target + `gcc-mingw-w64-x86-64`, sets the crate version, runs `cargo fmt --check` → `cargo test`, builds `x86_64-unknown-linux-gnu`, and cross-builds the Windows `.exe` via MinGW (`libsqlite3-sys` bundled is the only native dep — no openssl/ring/rustls, so cross-compile is the easy case). 3. **Package** — `uo-link-sidecar-linux-x86_64`, `uo-link-sidecar-windows-x86_64.exe`, `SHA256SUMS`. 4. **Release (engine)** — commits `chore(release): bump version to vX.Y.Z [skip ci]`, tags, pushes, then creates the Gitea release and uploads the three assets. The engine/adapter split keeps the release automation language-agnostic (consumes only `{version, changelog, artifacts}`) so it can be retargeted at C#/Node/Docker/static projects later — only the Rust adapter steps are Rust-specific. Also includes a `style(sidecar): apply rustfmt` commit so the new `cargo fmt --check` gate passes on the first run (formatting only, no behavior change). ## Prerequisites before this can cut a release - **Secrets** (already named to match the site's image build): `REGISTRY_USER` / `REGISTRY_TOKEN`. The token additionally needs **`write:repository`** scope (push the bump commit + tag, create the release) on top of the `write:package` it had. - **`main` must accept a direct push** from that user (no blocking branch protection), since the version-bump commit lands on `main`. The bump commit carries `[skip ci]` so it does not re-trigger the workflow. ## Note on this diff This branch is based on `feature/admin-controls`, so until PR #1 merges, this PR also shows those admin commits. Merging PR #1 first will collapse this down to just the rustfmt + CI commits. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
wtclaude added 2 commits 2026-07-13 19:52:24 +00:00
Format the sidecar source with `cargo fmt` so the new `cargo fmt --check`
CI gate passes on the first run. No behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0114TpmrNW4wNXsHq5CR72jQ
Auto-build and release the Rust sidecar on every push to main.

A language-agnostic "release engine" computes the next version from
conventional-commit subjects since the last v* tag (feat!/BREAKING ->
major, feat -> minor, fix|perf -> patch; first run ships the current
Cargo.toml version). An isolated "Rust adapter" runs cargo fmt --check /
test, builds x86_64-unknown-linux-gnu, and cross-builds
x86_64-pc-windows-gnu via MinGW (libsqlite3-sys is the only native dep).
It then commits the version bump ([skip ci]), tags vX.Y.Z, pushes, and
creates the Gitea release with the linux binary, windows .exe, and
SHA256SUMS.

Reuses the REGISTRY_USER / REGISTRY_TOKEN secrets; the token additionally
needs write:repository scope and main must accept a direct push.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0114TpmrNW4wNXsHq5CR72jQ
whitlocktech approved these changes 2026-07-14 16:44:40 +00:00
whitlocktech added 1 commit 2026-07-14 16:44:54 +00:00
whitlocktech merged commit b96a867691 into main 2026-07-14 16:46:09 +00:00
whitlocktech deleted branch ci/sidecar-release 2026-07-14 16:46:10 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RunicGateway/link#2
No description provided.