Skip to content

Wait for a reviewer before tagging the Go module and publishing Kotlin - #246

Merged
jeremy merged 3 commits into
mainfrom
release-hardening-v2
Oct 21, 2026
Merged

jeremy merged 3 commits into
mainfrom
release-hardening-v2

Conversation

@jeremy

@jeremy jeremy commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

The Go module tag and the Kotlin publish to GitHub Packages now wait for a reviewer, as the crates and npm publishes already do.

Why: crates and npm publish from their own environments with required reviewers. The Go job, which pushes the go/vX module tag, and the Kotlin job, which publishes to GitHub Packages, ran without one. They now run in release-go and release-github-packages.

Releasing now: push the v* tag as before. Each language's workflow then waits at its publish job:

  • Up to 4 approvals per release, one per workflow run: crates and go always; npm and github-packages (Kotlin) only when the tagged commit enables them. Swift publishes nothing gated; SwiftPM reads the tag.
  • Each publish job waits only on its own build, so every one is ready for approval as soon as its build passes.
  • The go/vX module tag is pushed only after approval.
  • release-github needs no approval of its own. Its orchestration now waits up to 5.5 hours for the publishes. A rejected or unanswered publish fails it. If approvals take longer than that, re-run it with gh workflow run release-github.yml -f tag=vX.Y.Z.

Who approves: a member of sip or cli. Prevent-self-review is on, so whoever pushed the tag can't approve their own release; another member does.

To approve every waiting run for a tag in one pass (GitHub still records one approval per run):

R=basecamp/hey-sdk TAG=vX.Y.Z
gh api repos/$R/compare/main...$TAG --jq .status    # behind or identical: the tag is on main
for id in $(gh run list -R $R --branch "$TAG" --event push --status waiting --json databaseId --jq '.[].databaseId'); do
  ids=$(gh api repos/$R/actions/runs/$id/pending_deployments --jq '[.[]|select(.current_user_can_approve)|.environment.id]')
  [ "$ids" = "[]" ] || gh api -X POST repos/$R/actions/runs/$id/pending_deployments --input - <<<"{\"environment_ids\":$ids,\"state\":\"approved\",\"comment\":\"$TAG\"}" >/dev/null
done

Run it again if a build finishes after the first pass.

Environment: all four environments already exist, require sip or cli, and admit only v* tags, including release-npm, which didn't exist before. Nothing else needs configuring when this merges.

Merging is the owners' call.


Summary by cubic

Go module tagging and Kotlin publishing to GitHub Packages now wait for a reviewer before publishing, matching the existing crates and npm release gates.

Releasing now

  • Requires up to 4 approvals per release: crates and go always; npm and GitHub Packages (Kotlin) only when the tagged commit enables them.
  • make release pushes only vX.Y.Z; the approved release job creates the go/vX module tag, since the module proxy serves a tag the moment it exists.
  • Each publish job waits only on its own build, so every one is ready for approval as soon as its build passes.
  • Approvers must be sip or cli members; the tag pusher can't approve their own release.
  • The release orchestrator waits up to 5.5 hours for approvals; re-run it with gh workflow run release-github.yml -f tag=vX.Y.Z if approvals take longer.

Written for commit 10efd5f. Summary will update on new commits.

View guided diff Turn on auto-fix

Copilot AI balanced review requested due to automatic review settings October 8, 2026 01:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-21T09:52:27.128194Z 10efd5f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread .github/workflows/release-go.yml Resolved
Comment thread .github/workflows/release-github.yml Resolved
@jeremy

jeremy commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

Release secrets and the per-registry environments

This repository publishes from one environment per registry:

  • release-crates
  • release-npm
  • release-github-packages
  • release-go

No secret needs to move into them, so there is nothing to rotate in here. Each publish authenticates with OIDC trusted publishing (the package registries) or GITHUB_TOKEN (the Go module tag and GitHub Packages), and the repository has no Actions secrets.

If a registry ever needs a token, put it in that registry's environment, not at repository level, and use the same order the other repositories follow:

  1. Issue a fresh token.
  2. Set it directly in the environment: gh secret set NAME --repo basecamp/hey-sdk --env release-<registry>
  3. Run, or wait for, one release under that environment and confirm it succeeds.
  4. Only then delete any repository-level copy and revoke the old token.

Each registry's trusted publisher should also name its environment (for example release-rubygems), so a publish from outside it is refused.

@jeremy
jeremy force-pushed the release-hardening-v2 branch from c5a8ade to 7ae6989 Compare October 21, 2026 09:22
make release tagged and pushed go/vX.Y.Z beside vX.Y.Z, so the module
was resolvable through proxy.golang.org before the release-go reviewer
approved, and release-go.yml's tag job found the tag already there.

make release now pushes vX.Y.Z alone; release-go.yml's tag job, behind
the release-go environment, creates go/vX.Y.Z. CONTRIBUTING says so.

The release workflow test now asserts no go/ tag and a push of vX.Y.Z
alone; it failed on that assertion against the old Makefile and passes
now (run with #266's PATH fix applied locally, which macOS needs).

Keeping the local go/ tag and moving the approval elsewhere was
rejected: the proxy serves a tag the moment it exists.
#264 landed a 5.5-hour wait step ahead of release-orchestrate and gave
the orchestrator timeout '1'. Rebased onto it, this branch's
timeout: '19800' became a second timeout key in the same with: block,
which actionlint (GitHub Actions audit) rejects.

release-github.yml is now main's copy. actionlint passes on the three
release workflows.
@jeremy
jeremy force-pushed the release-hardening-v2 branch from 64eb2cc to 10efd5f Compare October 21, 2026 09:52
@jeremy
jeremy merged commit 5549909 into main Oct 21, 2026
35 checks passed
@jeremy
jeremy deleted the release-hardening-v2 branch October 21, 2026 10:13
jeremy added a commit that referenced this pull request Oct 21, 2026
Brings in #268 and #269, which change HeyClient.kt's redirect and proof-refusal handling beside #270's revocation. Git merged them cleanly; make kt-check passes on the result.

* origin/main:
  Refresh a redirected write's hop 401 without making the write again (#269)
  Resend a 401 that refuses only the DPoP proof, with no refresh (#268)
  Answer the rotation test's first two requests by token, not by arrival (#274)
  Wait for a reviewer before tagging the Go module and publishing Kotlin (#246)
  Bump the cargo group across 1 directory with 3 updates (#252)
  Find true on PATH in the release test, so make release runs on macOS (#266)
  Bump the gradle group across 1 directory with 4 updates (#255)
  Bump the cargo group across 1 directory with 4 updates (#253)
  Bump the typescript-dev group across 1 directory with 2 updates (#249)
  Bump golang.org/x/net from 0.60.0 to 0.61.0 in /conformance/runner/go in the go group across 1 directory (#251)
  Bump vite from 8.3.0 to 8.3.5 in /typescript (#272)
  Bump rustls-webpki and webpki-root-certs past the emSign advisories (#273)
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.

2 participants