Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,7 @@ jobs:
|
|||||||
echo "$TAG" > "docs/.version"
|
echo "$TAG" > "docs/.version"
|
||||||
tar -czf /tmp/docs.tar.gz docs/
|
tar -czf /tmp/docs.tar.gz docs/
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release and Upload
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
@@ -39,13 +39,13 @@ jobs:
|
|||||||
\"body\": \"米普云航司API文档更新 ${TAG}\"
|
\"body\": \"米普云航司API文档更新 ${TAG}\"
|
||||||
}"
|
}"
|
||||||
|
|
||||||
# Get release ID
|
# Get release ID via python (no jq dependency)
|
||||||
RELEASE_ID=$(curl -sf "${API}/releases/tags/${TAG}" \
|
RELEASE_ID=$(curl -sf "${API}/releases/tags/${TAG}" \
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
-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
|
if [ -z "$RELEASE_ID" ] || [ "$RELEASE_ID" = "None" ]; then
|
||||||
echo "Error: failed to create release"
|
echo "Error: failed to get release ID"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user