Skip to content

Phase 6i: add publish-go (completes Phase 6)#38

Merged
joaoh82 merged 1 commit intomainfrom
feat/publish-go
Apr 25, 2026
Merged

Phase 6i: add publish-go (completes Phase 6)#38
joaoh82 merged 1 commit intomainfrom
feat/publish-go

Conversation

@joaoh82
Copy link
Copy Markdown
Owner

@joaoh82 joaoh82 commented Apr 25, 2026

Summary

The simplest job in the publish family — Go has no central registry, so this is just orchestration on top of tag-all + publish-ffi.

Job Cells Role
publish-go 1 (single ubuntu-latest) Verify sdk/go/v<V> tag exists; download FFI tarballs from sqlrite-ffi-v<V> release; create Go GitHub Release with the tarballs re-attached + cgo wiring docs

Why it's so small

Go modules pull straight from VCS. The moment tag-all pushes sdk/go/v0.1.X, go get github.com/joaoh82/rust_sqlite/sdk/go@v0.1.X works (modulo proxy.golang.org cache lag). There's no cargo publish / npm publish / pip upload equivalent — the tag IS the publish event.

What publish-go adds on top of that:

  1. Sanity check that tag-all did its job (cheap; fails loudly if upstream broke).
  2. One-stop-shop GitHub Release — re-attaches the FFI tarballs from publish-ffi's release so Go users get the cgo dependency on the same page as the go get instructions.
  3. Cgo wiring docs in the release body (CGO_CFLAGS, CGO_LDFLAGS, per-platform library path).

Tag-with-slashes

Go submodule tag convention requires <subpath>/vX.Y.Z for module paths with subpaths. Our path is github.com/joaoh82/rust_sqlite/sdk/go, so the canonical tag is sdk/go/v<V> with slashes intact. softprops/action-gh-release handles this fine; the umbrella release body uses URL-encoded sdk%2Fgo%2Fv<V> for the link.

Wiring

  • tag-all → adds sdk/go/v<V> to TAGS array
  • finalize.needs → extended with publish-go
  • Umbrella release body → 🐹 Go SDK entry

Test plan

  • YAML parses
  • Cargo files unchanged (Go is its own world)
  • CI on this PR
  • After merge: dispatch v0.1.9 canary. publish-go has no auth complexity (no registry, no OIDC, no tokens) — only failure modes are (a) tag-all upstream broke or (b) the sqlrite-ffi-v release doesn't have the expected tarballs. Both surface clearly in the verify-tag-exists or gh-release-download steps.
  • After v0.1.9 lands: try go get github.com/joaoh82/rust_sqlite/sdk/go@v0.1.9 from a fresh module to verify the proxy.golang.org caching works as expected.

What this completes

Phase 6 done end-to-end. Every product distribution channel ships on every release with one human action (Release PR review + merge):

Channel Tag Where
🦀 Rust engine sqlrite-v<V> crates.io (sqlrite-engine) + GitHub Release
🔧 C FFI sqlrite-ffi-v<V> GitHub Release (4 platform tarballs)
🖥️ Desktop sqlrite-desktop-v<V> GitHub Release (7 installer formats)
🐍 Python sqlrite-py-v<V> PyPI (sqlrite) + GitHub Release
🟢 Node.js sqlrite-node-v<V> npm (@joaoh82/sqlrite) + GitHub Release
🌐 WASM sqlrite-wasm-v<V> npm (@joaoh82/sqlrite-wasm) + GitHub Release
🐹 Go sdk/go/v<V> GitHub Release (with FFI tarballs) — proxy.golang.org pulls direct from tag
umbrella v<V> GitHub Release (auto-generated changelog)

Phase 7 (AI-era extensions) is next, on a fresh branch.

🤖 Generated with Claude Code

The simplest job in the publish family because Go has no central
registry. Modules pull straight from VCS via tag, so once
`tag-all` pushes `sdk/go/v<V>` (the slash-bearing submodule tag
Go modules require for path `github.com/joaoh82/rust_sqlite/sdk/go`),
`go get …@vX.Y.Z` works the moment proxy.golang.org's cache
catches up.

What the publish-go job actually does:

  1. Verifies `tag-all` pushed `sdk/go/v<V>` (cheap consistency
     check — if upstream broke, fail loudly)
  2. Downloads the per-platform `libsqlrite_c-*.tar.gz` tarballs
     that publish-ffi already uploaded to the
     `sqlrite-ffi-v<V>` release (via `gh release download`)
  3. Re-attaches them to a fresh Go GitHub Release at the
     `sdk/go/v<V>` tag, so Go users have one page with both the
     `go get` instructions AND the cgo dependency tarballs

Release body documents the cgo wiring per platform
(`CGO_CFLAGS`, `CGO_LDFLAGS`, `LD_LIBRARY_PATH` /
`DYLD_LIBRARY_PATH` / `%PATH%`) so users can extract a tarball
and build immediately without spelunking through the Rust
toolchain instructions in the FFI README.

Tag-with-slashes design choice: Go submodule tag convention is
`<subpath>/vX.Y.Z` for module-paths-with-subpaths. We use
`sdk/go/v<V>` (slashes intact). softprops/action-gh-release
handles the slash-bearing tag fine; the URL in the umbrella
release body uses URL-encoded `sdk%2Fgo%2Fv<V>` for the link.

Wiring:

  - tag-all → pushes `sdk/go/v<V>`
  - finalize.needs → extended with publish-go
  - umbrella release body → 🐹 Go SDK entry

Docs:

  - docs/roadmap.md — Phase 6i marked done with the design
    rationale captured + a closing note that Phase 6 is now
    complete end-to-end
  - sdk/go/README.md — installation paragraph updated to
    reflect that prebuilt FFI tarballs ship on every release
    (was: "Phase 6e will publish prebuilt binaries")
  - root README.md — checkbox flipped + summary line for 6i

Test plan after merge: dispatch v0.1.9 canary. publish-go has
no auth complexity (no registry, no OIDC, no tokens), so the
only failure modes are (a) tag-all upstream broke, or (b) the
sqlrite-ffi-v<V> release doesn't have the expected tarballs.
Both surface clearly in the verify-tag-exists step or the
gh-release-download step's output.

After this, **Phase 6 is complete** — every product distribution
channel (Rust crate, C FFI, desktop installer, Python wheel,
Node.js binding, WASM, Go module) ships on every release with
one human action (Release PR review + merge).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@joaoh82 joaoh82 merged commit d8cc384 into main Apr 25, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant