From 7cb67e711cffcf4feb8913f5e1cb171c348fff0b Mon Sep 17 00:00:00 2001 From: MotherSphere Date: Wed, 2 Sep 2026 12:36:26 +0200 Subject: [PATCH] fix(release): tell gh which repository, or the release publishes empty Three `gh release` calls ran without `-R`, in two jobs that have no `actions/checkout`. Without a checkout there is no git remote to infer the repository from, so gh dies with "fatal: not a git repository". This is not hypothetical. It is what happened to v0.3.0: the draft-hold step failed, `build` and `publish` were skipped as a result, and the tag was published carrying no assets at all. It is still sitting at /releases/latest with nothing to download, so Colony's installer has nothing to fetch. Colony hit the identical bug and paid for it with an empty v0.10.0; its workflow now carries the warning in a comment. Grape had the same shape and had never been corrected, and the other two calls would have failed the same way had the first not failed before reaching them. --- .github/workflows/release.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 124796f..c5ffc3f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,7 +61,13 @@ jobs: if: ${{ steps.release.outputs.release_created }} env: GH_TOKEN: ${{ github.token }} - run: gh release edit "${{ steps.release.outputs.tag_name }}" --draft=true + # `-R` is not optional: this job has no `actions/checkout`, so `gh` has + # no git remote to infer the repository from and dies with "fatal: not + # a git repository". That is exactly what happened on v0.3.0 — this step + # failed, `build` and `publish` were skipped, and the tag was published + # with no assets at all. Colony carries the same warning after paying + # for it with an empty v0.10.0. + run: gh release edit "${{ steps.release.outputs.tag_name }}" -R "${{ github.repository }}" --draft=true build: name: build ${{ matrix.asset }} @@ -226,7 +232,7 @@ jobs: steps: - name: Verify the release carries everything run: | - gh release view "$TAG" --json assets --jq '.assets[].name' | sort > /tmp/published + gh release view "$TAG" -R "$GITHUB_REPOSITORY" --json assets --jq '.assets[].name' | sort > /tmp/published for a in $ASSETS; do required="$a" if [ "$SIGNED" = "true" ]; then @@ -240,4 +246,5 @@ jobs: echo "release verified" - name: Make the release visible - run: gh release edit "$TAG" --draft=false + # Same reason as the draft step above: no checkout in this job either. + run: gh release edit "$TAG" -R "$GITHUB_REPOSITORY" --draft=false