fix(ci): set GH_REPO so Go release upload works without checkout

The release job only downloads artifacts; gh was failing with
'not a git repository' on every release view/create/upload.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
This commit is contained in:
UNITRONIX
2026-10-18 23:24:24 +02:00
parent d2c9bcfe29
commit dd67f0ed33
2 changed files with 8 additions and 3 deletions
+5 -1
View File
@@ -136,6 +136,9 @@ jobs:
- name: Upload server artifacts to GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Required: this job has no checkout; without GH_REPO, `gh` shells out to
# git and fails with "not a git repository".
GH_REPO: ${{ github.repository }}
TAG_NAME: ${{ github.ref_name }}
run: |
set -euo pipefail
@@ -168,10 +171,11 @@ jobs:
if [ "$found" -ne 1 ]; then
echo "Creating GitHub Release ${TAG_NAME} (version-bump did not publish it in time)"
# No --verify-tag: release job has no .git checkout.
gh release create "$TAG_NAME" \
--title "BetterDesk ${TAG_NAME#v}" \
--notes "BetterDesk ${TAG_NAME#v} server artifacts." \
--verify-tag
--target "${GITHUB_SHA}"
fi
gh release upload "$TAG_NAME" \
+3 -2
View File
@@ -1,7 +1,8 @@
## [Unreleased]
### Changed
- _(none yet)_
### Fixed
- Go Server release job: set `GH_REPO` so `gh` works without a git checkout (upload no longer
fails with `not a git repository`).
---