ci: gh release download 需显式 --repo

回读校验先 cd /tmp/back(非 git 目录),而 gh 默认从当前目录的
git 上下文推断仓库,于是报 "not a git repository" —— 发布本身
成功(tag/release/附件齐全),却被这道校验误判为失败。

改为 gh release download "$TAG" --repo "$GITHUB_REPOSITORY"。
This commit is contained in:
JianFeeeee
2026-09-29 14:39:12 +08:00
parent dc9e7d0495
commit 56c694cd7c

View File

@ -249,7 +249,9 @@ jobs:
run: |
set -euo pipefail
mkdir -p /tmp/back && cd /tmp/back
gh release download "$TAG"
# 同主仓:/tmp/back 不是 git 仓库,gh 无法从上下文推断仓库,
# 必须显式 --repo。
gh release download "$TAG" --repo "$GITHUB_REPOSITORY"
for f in *; do
printf " %8.1fMB %s\n" \
"$(stat -c %s "$f" | awk '{print $1/1048576}')" "$f"