v1.6.0 #13

Merged
timi merged 28 commits from dev into master 2026-11-20 06:30:23 +00:00
Showing only changes of commit 3ccb586015 - Show all commits
+16 -2
View File
@@ -281,8 +281,22 @@ jobs:
API_TOKEN: ${{ secrets.TIMI_API_TOKEN }}
RELEASE_ID: ${{ steps.create.outputs.release_id }}
run: |
curl -sS -X POST "$API_BASE_URL/app/release/publish?releaseId=$RELEASE_ID&channelCode=stable" \
-H "Token: $API_TOKEN"
if [ -z "$RELEASE_ID" ]; then
echo "FAIL: 缺少发布记录 ID"
exit 1
fi
# -f 让 4xx/5xx 直接失败;否则下面那句 OK 会照打,tag 也会照建
response=$(curl -sS -f -X POST "$API_BASE_URL/app/release/publish?releaseId=$RELEASE_ID&channelCode=stable" \
-H "Token: $API_TOKEN") || {
echo "FAIL: 发布接口调用失败"
exit 1
}
echo "响应:$response"
# 业务层异常仍可能是 200 + fail:true,这里再兜一层
if printf '%s' "$response" | grep -qE '"fail"[[:space:]]*:[[:space:]]*true|"success"[[:space:]]*:[[:space:]]*false'; then
echo "FAIL: 发布未生效,请检查后端日志"
exit 1
fi
echo "OK: 已发布到 stable"
# 打 tag 的时机是「上线成功」而不是「PR 合并」:草稿发布和失败发布都不该留下版本标记。