Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs(sdk): document how the Go SDK is released
Yudhi Armyndharisea9341b84e40
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex c091e71dd..d6b27c44f 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0- **The JavaScript SDK now publishes to npm from CI** via Trusted Publishing (OIDC) on a `js-sdk-v*` tag — no npm token exists anywhere, and every release carries build provenance.- **The Python SDK now publishes to PyPI from CI** via Trusted Publishing (OIDC) on a `py-sdk-v*` tag — no PyPI token exists anywhere, matching the JavaScript SDK's release path.+- **The Go SDK documents how it is released** — tags must carry the `sdk/go/` module prefix, so a bare `v*` app tag never publishes it and callers can finally pin a version instead of a pseudo-version.### Fixeddiff --git a/sdk/go/README.md b/sdk/go/README.mdindex 7b245b7c9..6055c9f22 100644--- a/sdk/go/README.md+++ b/sdk/go/README.md@@ -172,3 +172,34 @@ go vet ./...The `TestRouting` table asserts the exact method and path of every service call,so a wrong path (the historical `/messages/text` vs `/messages/send-text`) failsat test time.++## Releasing++There is no publish workflow, and none is possible: Go has no registry to push+to. The module proxy serves whatever a repository tag points at, so **tagging+is the release**.++The tag must carry the module's directory prefix, because the module lives in a+subdirectory rather than at the repository root:++```bash+# Correct — `sdk/go/` prefix, matching `module github.com/rmyndharis/OpenWA/sdk/go`+git tag sdk/go/v0.2.0 && git push origin sdk/go/v0.2.0+```++A bare `v0.2.0` tag is the *app* version and does nothing for this module.+Without a prefixed tag, `go get` resolves a pseudo-version+(`v0.0.0-<date>-<commit>`) — usable, but callers cannot pin a release.++Cutting a release:++1. Bump `DefaultUserAgent` in `options.go` (it carries the SDK version and is+ sent on every request, so it drifts silently if only the tag moves).+2. Land that on `main`.+3. Tag that commit `sdk/go/v<version>` and push the tag.++> **A published version is immutable.** Once the module proxy has served+> `sdk/go/vX.Y.Z` it caches it permanently — deleting or moving the tag does not+> take it back, and the only remedy is to publish a higher version (and, if the+> bad one must be discouraged, a `retract` directive in `go.mod`). Tag a commit+> that is already green on `main`.