From 56c694cd7c286db73c54e72a77fdb3509d6d59ec Mon Sep 17 00:00:00 2001 From: JianFeeeee Date: Tue, 29 Sep 2026 14:39:12 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20gh=20release=20download=20=E9=9C=80?= =?UTF-8?q?=E6=98=BE=E5=BC=8F=20--repo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 回读校验先 cd /tmp/back(非 git 目录),而 gh 默认从当前目录的 git 上下文推断仓库,于是报 "not a git repository" —— 发布本身 成功(tag/release/附件齐全),却被这道校验误判为失败。 改为 gh release download "$TAG" --repo "$GITHUB_REPOSITORY"。 --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33ad6ec..a95191d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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"