From 48670693837889f2118c4b9f683af975e500f299 Mon Sep 17 00:00:00 2001 From: wchwawa Date: Wed, 21 Oct 2026 19:26:57 +1100 Subject: [PATCH] fix(release): name the repository for gh in the Homebrew publish job The publish step now works from the release directory, outside the checkout, so gh could no longer infer the repository from git and the v0.12.0 rerun failed with "not a git repository". Set GH_REPO for the job, as the Python SDK publish job already does. Signed-off-by: wchwawa --- .github/workflows/release-homebrew.yml | 1 + scripts/release/test_homebrew_source_release.py | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/release-homebrew.yml b/.github/workflows/release-homebrew.yml index 23dd19d29..185b0b45f 100644 --- a/.github/workflows/release-homebrew.yml +++ b/.github/workflows/release-homebrew.yml @@ -198,6 +198,7 @@ jobs: env: EXPECTED_COMMIT: ${{ needs.validate.outputs.commit }} GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} RELEASE_TAG: ${{ needs.validate.outputs.tag }} RELEASE_VERSION: ${{ needs.validate.outputs.version }} steps: diff --git a/scripts/release/test_homebrew_source_release.py b/scripts/release/test_homebrew_source_release.py index 6c3584c57..834a3dae4 100644 --- a/scripts/release/test_homebrew_source_release.py +++ b/scripts/release/test_homebrew_source_release.py @@ -407,6 +407,7 @@ def test_workflow_keeps_untrusted_tag_away_from_shell_and_tokens(self) -> None: self.assertIn("gh pr create", workflow) self.assertIn("--latest", workflow) self.assertIn('gh release upload "$RELEASE_TAG"', workflow) + self.assertIn("GH_REPO: ${{ github.repository }}", workflow) self.assertIn("Fail closed unless the tap is public", workflow) self.assertIn('"$private" != "false"', workflow) self.assertIn('"$visibility" != "public"', workflow)