From acc89faa8bcd8eece0afdb8fb4263ed62e962cb2 Mon Sep 17 00:00:00 2001 From: zhilv Date: Tue, 26 May 2026 15:22:51 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(release):=20=E7=94=A8?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=88=86=E6=94=AF=E6=9B=BF=E4=BB=A3=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=20SHA=20=E5=88=9B=E5=BB=BA=20Release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 发布步骤不再将 git rev-parse HEAD 的完整提交 SHA 作为 target_commitish - 改为显式使用 main,匹配当前 Gitea 实例对 Release 创建接口的可接受参数 - 清理前面为定位 token 问题加入的临时 probe 调试逻辑 --- .gitea/workflows/release.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index bc5df9c..d10b526 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -135,22 +135,12 @@ jobs: GITEA_URL="${SERVER_URL%/}" GITEA_OWNER="${REPOSITORY%%/*}" GITEA_REPO="${REPOSITORY#*/}" - printf '%s' "$GITEA_TOKEN" | sha256sum - env | sort | grep -E '^(GITEA|GITHUB|RELEASE)_' || true - curl -sS -o /tmp/lightops-create-release-probe.json -w 'probe create release status: %{http_code}\n' \ - -X POST \ - -H "Authorization: token ${GITEA_TOKEN}" \ - -H "Content-Type: application/json" \ - -d '{"tag_name":"probe-v0-1-22","target_commitish":"main","name":"probe-v0-1-22","body":"probe","draft":false,"prerelease":true}' \ - "${GITEA_URL}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/releases" || true - cat /tmp/lightops-create-release-probe.json || true cd lightops-src TAG="$(cat /tmp/lightops-release-tag)" - TARGET_SHA="$(git rev-parse HEAD)" bash scripts/publish-gitea-release.sh \ --tag "$TAG" \ --title "LightOps ${TAG}" \ - --target "$TARGET_SHA" \ + --target "main" \ --no-create-tag \ --no-push-tag \ --package target/releases/*.tar.gz \