This commit is contained in:
@@ -100,12 +100,11 @@ jobs:
|
|||||||
echo "Release ID: ${{ env.RELEASE_ID }}"
|
echo "Release ID: ${{ env.RELEASE_ID }}"
|
||||||
|
|
||||||
# Gitea 上传 API: POST /repos/{owner}/{repo}/releases/{id}/assets
|
# Gitea 上传 API: POST /repos/{owner}/{repo}/releases/{id}/assets
|
||||||
|
# 注意:Gitea 只需要 attachment 参数,文件名从文件自动获取
|
||||||
UPLOAD_RESPONSE=$(curl -s -X POST \
|
UPLOAD_RESPONSE=$(curl -s -X POST \
|
||||||
"https://gitea.kg8.net/api/v1/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets" \
|
"https://gitea.kg8.net/api/v1/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets" \
|
||||||
-H "Authorization: token ${{ secrets.ACTIONS_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.ACTIONS_TOKEN }}" \
|
||||||
-H "Content-Type: application/vnd.android.package-archive" \
|
-F "attachment=@app/build/outputs/apk/release/${{ env.APK_NAME }}")
|
||||||
-F "attachment=@app/build/outputs/apk/release/${{ env.APK_NAME }}" \
|
|
||||||
-F "name=${{ env.APK_NAME }}")
|
|
||||||
|
|
||||||
echo "上传响应: $UPLOAD_RESPONSE"
|
echo "上传响应: $UPLOAD_RESPONSE"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user