18 Commits

Author SHA1 Message Date
9b7f720564 Try alternative release creation
All checks were successful
Build Android APK / build (push) Successful in 3m4s
2026-04-17 00:51:11 +02:00
254c8bb67d Fix release tag issue 2026-04-16 19:55:16 +02:00
122eff7b03 Rename APK with version name 2026-04-16 19:51:24 +02:00
5eeefc0e32 Use GITEATOKEN secret
Some checks failed
Build Android APK / build (push) Failing after 2m54s
2026-04-16 19:29:54 +02:00
cf4aa32061 Improve release creation logging 2026-04-16 19:18:52 +02:00
0e1f2e0bd7 Debug release creation 2026-04-16 19:14:47 +02:00
6dffd6786b Fix release API call 2026-04-16 19:09:02 +02:00
cdf30c7f09 Fix release creation for Gitea 2026-04-16 19:03:09 +02:00
4a118a3883 Add release creation step 2026-04-16 18:48:37 +02:00
4f57184e78 Use upload-artifact v3 for GHES compatibility
All checks were successful
Build Android APK / build (push) Successful in 2m59s
2026-04-16 18:22:28 +02:00
1ab2a5069c Remove corrupted PNG file
Some checks failed
Build Android APK / build (push) Failing after 2m59s
2026-04-16 18:18:22 +02:00
2ef39942cd Change Java version to 17 for CI compatibility
Some checks failed
Build Android APK / build (push) Failing after 1m30s
2026-04-16 18:15:37 +02:00
d08f5169f3 Use setup-android action
Some checks failed
Build Android APK / build (push) Failing after 1m5s
2026-04-16 18:13:49 +02:00
0b83656b9d Add distribution to setup-java
Some checks failed
Build Android APK / build (push) Failing after 17s
2026-04-16 18:12:57 +02:00
062232a0bc Remove debugging step
Some checks failed
Build Android APK / build (push) Failing after 6s
2026-04-16 18:11:55 +02:00
7b0f443426 Use Java 17 in workflow
Some checks failed
Build Android APK / build (push) Failing after 1m21s
2026-04-16 17:54:48 +02:00
08202d097f Fix workflow config
Some checks failed
Build Android APK / build (push) Has been cancelled
2026-04-16 17:52:19 +02:00
93a71a75b8 Add gradle wrapper jar
Some checks failed
Build Android APK / build (push) Has been cancelled
2026-04-16 17:49:14 +02:00
5 changed files with 124 additions and 20 deletions

View File

@@ -8,34 +8,91 @@ on:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 21
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: '21'
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK
run: |
mkdir -p $ANDROID_HOME/cmdline-tools
cd $ANDROID_HOME/cmdline-tools
wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O cmdline-tools.zip
unzip -q cmdline-tools.zip
mv cmdline-tools latest
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null 2>&1
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-34" "build-tools;34.0.0"
uses: android-actions/setup-android@v2
- name: Build APK
- name: Build with Gradle
run: |
chmod +x ./gradlew
./gradlew assembleRelease --no-daemon -Dorg.gradle.java.home=$JAVA_HOME
./gradlew assembleRelease --no-daemon
- name: Upload APK
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: apk
path: app/build/outputs/apk/release/*.apk
path: app/build/outputs/apk/release/*.apk
- name: Create Release
run: |
# Get tag name from git
TAG_NAME=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
if [ -z "$TAG_NAME" ]; then
TAG_NAME="${GITHUB_REF#refs/tags/}"
fi
# Quitar la v del tag si existe
TAG_NAME_CLEAN="${TAG_NAME#v}"
APK_FILE=$(ls app/build/outputs/apk/release/*.apk | head -1)
# Rename APK with version
NEW_NAME="Helldivers-app-${TAG_NAME}.apk"
cp "$APK_FILE" "$NEW_NAME"
echo "=== Creating release for tag: $TAG_NAME ==="
echo "APK file: $APK_FILE"
# Use the token from secrets
if [ -z "${{ secrets.GITEATOKEN }}" ]; then
echo "ERROR: No GITEATOKEN found"
exit 1
fi
# Create release using Gitea API - Create from existing tag
echo "Creating release..."
RELEASE_RESP=$(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.GITEATOKEN }}" \
-d "{
\"tag_name\": \"${TAG_NAME}\",
\"name\": \"Release ${TAG_NAME_CLEAN}\",
\"body\": \"Built from tag ${TAG_NAME}\",
\"draft\": false,
\"prerelease\": false
}")
echo "Release response: $RELEASE_RESP"
# Extract release ID
RELEASE_ID=$(echo "$RELEASE_RESP" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2)
if [ -z "$RELEASE_ID" ]; then
echo "ERROR: Could not get release ID"
echo "$RELEASE_RESP"
exit 1
fi
echo "Release ID: $RELEASE_ID"
# Upload the APK as an asset
echo "Uploading APK..."
UPLOAD_RESP=$(curl -s -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.GITEATOKEN }}" \
-F "attachment=@${NEW_NAME}")
echo "Upload response: $UPLOAD_RESP"
echo "=== Release created successfully ==="

View File

@@ -9,7 +9,7 @@ android {
defaultConfig {
applicationId "com.helldivers.app"
minSdk 18
targetSdk 21
targetSdk 34
versionCode 1
versionName "1.0.0-LIBERTY"
multiDexEnabled true
@@ -27,14 +27,14 @@ android {
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
coreLibraryDesugaringEnabled true
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
languageVersion = JavaLanguageVersion.of(17)
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

47
docker-compose.yml Normal file
View File

@@ -0,0 +1,47 @@
version: "3.8"
services:
gitea:
image: gitea/gitea:latest
container_name: gitea
restart: always
environment:
- USER_UID=1000
- USER_GID=1000
volumes:
- /srv/data/gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
networks:
- proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.gitea.rule=Host(`git-dangilcal.duckdns.org`)"
- "traefik.http.routers.gitea.entrypoints=websecure"
- "traefik.http.routers.gitea.tls.certresolver=le"
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
- "traefik.http.routers.gitea-http.rule=Host(`git-dangilcal.duckdns.org`)"
- "traefik.http.routers.gitea-http.entrypoints=web"
- "traefik.http.routers.gitea-http.middlewares=redirect-to-https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.permanent=true"
gitea-runner:
image: gitea/act_runner:latest
container_name: gitea-runner
restart: always
depends_on:
- gitea
environment:
- GITEA_INSTANCE_URL=https://git-dangilcal.duckdns.org
- GITEA_RUNNER_REGISTRATION_TOKEN=TU_TOKEN_AQUI
- GITEA_RUNNER_NAME=runner-docker
volumes:
- /srv/data/gitea-runner:/data
- /var/run/docker.sock:/var/run/docker.sock
networks:
- proxy
networks:
proxy:
external: true

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.