From 8b9247291bfc199bdab42e928ea43b01a4cb0c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=9F=B3=E6=9D=B0?= Date: Mon, 4 May 2026 17:36:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20CI=E5=B7=A5=E4=BD=9C=E6=B5=81=E5=8E=BB?= =?UTF-8?q?=E6=8E=89jq=E4=BE=9D=E8=B5=96=EF=BC=8C=E6=94=B9=E7=94=A8python3?= =?UTF-8?q?=E8=A7=A3=E6=9E=90JSON?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- .gitea/workflows/release-docs.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/release-docs.yml b/.gitea/workflows/release-docs.yml index 9a5a057..aaf781e 100644 --- a/.gitea/workflows/release-docs.yml +++ b/.gitea/workflows/release-docs.yml @@ -22,7 +22,7 @@ jobs: echo "$TAG" > "docs/.version" tar -czf /tmp/docs.tar.gz docs/ - - name: Create Release + - name: Create Release and Upload env: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} run: | @@ -39,13 +39,13 @@ jobs: \"body\": \"米普云航司API文档更新 ${TAG}\" }" - # Get release ID + # Get release ID via python (no jq dependency) RELEASE_ID=$(curl -sf "${API}/releases/tags/${TAG}" \ -H "Authorization: token ${GITEA_TOKEN}" \ - | jq -r '.id') + | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])") - if [ -z "$RELEASE_ID" ] || [ "$RELEASE_ID" = "null" ]; then - echo "Error: failed to create release" + if [ -z "$RELEASE_ID" ] || [ "$RELEASE_ID" = "None" ]; then + echo "Error: failed to get release ID" exit 1 fi