ci: use PACKAGE_TOKEN (bearer) for package registry upload
All checks were successful
Android Build & Publish / android (push) Successful in 2m0s

This commit is contained in:
Giancarmine Salucci
2026-05-25 09:00:17 +02:00
parent 58494f37ab
commit 49e51748d7

View File

@@ -103,11 +103,10 @@ jobs:
android/app/build/outputs/apk/release/app-release-unsigned.apk
retention-days: 30
# ── 10. Publish to Gitea generic package registry (best-effort) ──────────
# ── 10. Publish to Gitea generic package registry ────────────────────────
- name: Publish APKs to Gitea package registry
continue-on-error: true
env:
GITEA_ACTOR: ${{ gitea.actor }}
TOKEN: ${{ secrets.PACKAGE_TOKEN }}
run: |
set -euo pipefail
VERSION="${{ github.run_number }}"
@@ -119,15 +118,15 @@ jobs:
HTTP=$(curl --silent --show-error \
--output /dev/null --write-out "%{http_code}" \
-X PUT \
-u "gitea-actions:${{ secrets.GITEA_TOKEN }}" \
-H "Authorization: token $TOKEN" \
--upload-file "$src" \
"$BASE/$VERSION/$dst_name")
echo " HTTP $HTTP"
if [[ "$HTTP" == "20"* ]]; then
echo "✓ $dst_name → $BASE/$VERSION/$dst_name"
else
echo "⚠ Package registry upload skipped (HTTP $HTTP) — download APKs from the workflow artifacts above"
if [[ "$HTTP" != "20"* ]]; then
echo "✗ Upload failed — HTTP $HTTP"
exit 1
fi
echo "✓ $dst_name → $BASE/$VERSION/$dst_name"
}
upload android/app/build/outputs/apk/debug/app-debug.apk \
@@ -135,3 +134,5 @@ jobs:
upload android/app/build/outputs/apk/release/app-release-unsigned.apk \
app-release-unsigned.apk
echo "📦 Package index: $BASE/$VERSION/"