This commit is contained in:
@@ -97,7 +97,7 @@ jobs:
|
||||
TAG=${GITHUB_REF_NAME}
|
||||
API="${{ github.api_url }}/repos/${GITHUB_REPOSITORY}"
|
||||
REL=$(curl -s -X POST "$API/releases" \
|
||||
-H "Authorization: token ${GITHUB_TOKEN}" \
|
||||
-H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\",\"body\":\"OnBudget ${TAG} — debug + release APKs\"}")
|
||||
ID=$(echo "$REL" | python3 -c "import json,sys; print(json.load(sys.stdin)['id'])")
|
||||
@@ -105,6 +105,6 @@ jobs:
|
||||
for f in build/app/outputs/flutter-apk/app-debug.apk build/app/outputs/flutter-apk/app-release.apk; do
|
||||
echo "uploading $(basename "$f")"
|
||||
curl -s -X POST "$API/releases/${ID}/assets?name=$(basename "$f")" \
|
||||
-H "Authorization: token ${GITHUB_TOKEN}" \
|
||||
-H "Authorization: token $GITHUB_TOKEN" \
|
||||
-F "attachment=@$f" | python3 -c "import json,sys; d=json.load(sys.stdin); print(' ok:', d.get('name'))"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user