From 34cb5b697523ba595a77d02a36a1885210489b76 Mon Sep 17 00:00:00 2001 From: draw me an elephant <68925779+drawmeanelephant@users.noreply.github.com> Date: Mon, 24 Aug 2026 19:25:19 -0400 Subject: [PATCH] fix(ci): pass -R to the publish job's gh release calls (#117) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every Binaries run since the #100 restructure fails at the Publish step: the publish job has no checkout (it only ships artifacts), and gh falls back to git repository discovery when no -R is given — with no .git in the job workspace it dies with "failed to run git: fatal: not a git repository" before ever reaching the API. The top-level permissions: contents: write was never the problem. Pass -R "$GITHUB_REPOSITORY" to release view/create/upload so the calls address the repo directly; no checkout step, no other behavior changes. Closes #117 Co-authored-from: BeauBoorman/oliver@dbdd4c3 --- .github/workflows/binaries.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/binaries.yml b/.github/workflows/binaries.yml index c715582..4462620 100644 --- a/.github/workflows/binaries.yml +++ b/.github/workflows/binaries.yml @@ -134,13 +134,17 @@ jobs: # Create the release once; on later runs it already exists and only # the assets are replaced (--clobber makes re-runs idempotent). + # This job has no checkout (it only ships artifacts), so gh cannot + # discover the repository from a .git directory — every call passes + # -R explicitly or dies with "failed to run git: fatal: not a git + # repository" (issue #117). - name: Publish to the builds release env: GH_TOKEN: ${{ github.token }} run: | - if ! gh release view builds >/dev/null 2>&1; then - gh release create builds \ + if ! gh release view builds -R "$GITHUB_REPOSITORY" >/dev/null 2>&1; then + gh release create builds -R "$GITHUB_REPOSITORY" \ --title "Oliver prebuilt binaries" \ --notes "Rolling prebuilt binaries for the current tip of main — linux/macos (x86_64, aarch64) and windows-x86_64, each smoke-tested natively in CI before publishing. Download URL: https://github.com/drawmeanelephant/oliver/releases/download/builds/oliver--" fi - gh release upload builds dist/* sha256sums.txt --clobber + gh release upload builds dist/* sha256sums.txt --clobber -R "$GITHUB_REPOSITORY"