Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user