Debug release creation

This commit is contained in:
2026-04-16 19:14:47 +02:00
parent 6dffd6786b
commit 0e1f2e0bd7

View File

@@ -34,19 +34,32 @@ jobs:
- name: Create Release
run: |
set -x
TAG_NAME=${GITHUB_REF#refs/tags/}
APK_FILE=$(ls app/build/outputs/apk/release/*.apk | head -1)
# Create release via API
curl -X POST "https://git-dangilcal.duckdns.org/api/v1/repos/dangilcal/Helldivers-app-movil/releases" \
echo "Tag: $TAG_NAME"
echo "APK: $APK_FILE"
echo "Token exists: ${{ secrets.GITHUB_TOKEN != '' }}"
TOKEN=${{ secrets.GITHUB_TOKEN }}
# Create release
RELEASE_JSON=$(curl -s -X POST "https://git-dangilcal.duckdns.org/api/v1/repos/dangilcal/Helldivers-app-movil/releases" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-d "{\"tag_name\": \"$TAG_NAME\", \"name\": \"Release $TAG_NAME\", \"draft\": false, \"prerelease\": false}"
-H "Authorization: token $TOKEN" \
-d "{\"tag_name\": \"$TAG_NAME\", \"name\": \"Release $TAG_NAME\", \"draft\": false, \"prerelease\": false}")
echo "Release created: $RELEASE_JSON"
RELEASE_ID=$(echo $RELEASE_JSON | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2)
echo "Release ID: $RELEASE_ID"
# Upload asset
curl -X POST "https://git-dangilcal.duckdns.org/api/v1/repos/dangilcal/Helldivers-app-movil/releases/tags/$TAG_NAME/assets" \
curl -v -X POST "https://git-dangilcal.duckdns.org/api/v1/repos/dangilcal/Helldivers-app-movil/releases/$RELEASE_ID/assets" \
-H "accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Authorization: token $TOKEN" \
-F "attachment=@$APK_FILE"