From 8aced4145eb0dc67130ed65642b997f51acfb6cf Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 27 Jun 2025 11:48:13 -0700 Subject: [PATCH] docs: add release instructions to CONTRIBUTING.md --- CONTRIBUTING.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ea01007..e487565 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,3 +22,64 @@ sign a new one. This project follows [Google's Open Source Community Guidelines](https://opensource.google/conduct/). + +## Releasing (Google team members only) + +This section is for Google team members who are responsible for releasing new versions of the test server and SDKs. + +### Releasing the `test-server` binary + +This process creates a new GitHub release and attaches the compiled binaries. + +#### Prerequisites + +Make sure you have `goreleaser` installed: + +```sh +go install github.com/goreleaser/goreleaser/v2@latest +``` + +#### Steps + +1. Ensure your local `main` branch is up-to-date and clean: + ```sh + git checkout main && git pull origin main && git clean -xdf + ``` +2. Create and push a new version tag. For example, for version `v0.2.2`: + ```sh + git tag -a v0.2.2 -m "Release v0.2.2" + git push origin v0.2.2 + ``` +3. Run GoReleaser: + ```sh + goreleaser release + ``` +4. Verify that a new release with the updated binaries is available on the project's GitHub Releases page. + +### Updating the Go release binary pin in the SDKs + +After a new `test-server` binary is released, you need to update the checksums pinned in the SDKs. + +1. Run the `update-sdk-checksums` script with the new version tag. For example: + ```sh + go run scripts/update-sdk-checksums/main.go v0.2.2 + ``` + This updates the pinned checksums (currently only in the TypeScript SDK). +2. Commit and push the changes. These changes will be included in the next SDK release. + +### Publishing the TypeScript SDK to npm + +1. Ensure your local `main` branch is up-to-date and clean: + ```sh + git checkout main && git pull origin main && git clean -xdf + ``` +2. Navigate to the TypeScript SDK directory: + ```sh + cd sdks/typescript + ``` +3. Update the `version` in `package.json` (e.g., using `npm version patch`). +4. Install dependencies and build the SDK: + ```sh + npm ci && npm run build + ``` +5. Publish the new version to npm following internal guidance at go/wombat-dressing-room.