Use $GITHUB_TOKEN consistently in release curl calls
build-apk / build (push) Canceled after 2m1s

This commit is contained in:
2026-08-12 00:51:40 +03:00
parent 269f17ce66
commit 4e18000773
+2 -2
View File
@@ -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