Compare commits
24 Commits
0be1ae97ff
...
v0.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 3db3075ca9 | |||
| a299f081d5 | |||
| e69a617a96 | |||
| d4b079bc75 | |||
| de1bd7c1b8 | |||
| 683287bfbb | |||
| 9b7f720564 | |||
| 254c8bb67d | |||
| 122eff7b03 | |||
| 5eeefc0e32 | |||
| cf4aa32061 | |||
| 0e1f2e0bd7 | |||
| 6dffd6786b | |||
| cdf30c7f09 | |||
| 4a118a3883 | |||
| 4f57184e78 | |||
| 1ab2a5069c | |||
| 2ef39942cd | |||
| d08f5169f3 | |||
| 0b83656b9d | |||
| 062232a0bc | |||
| 7b0f443426 | |||
| 08202d097f | |||
| 93a71a75b8 |
@@ -8,34 +8,103 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up JDK 21
|
- name: Setup JDK
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: '21'
|
java-version: '17'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
|
|
||||||
- name: Setup Android SDK
|
- name: Setup Android SDK
|
||||||
run: |
|
uses: android-actions/setup-android@v2
|
||||||
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"
|
|
||||||
|
|
||||||
- name: Build APK
|
- name: Setup Keystore
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.ANDROIDKEYSTOREBASE64 }}" | base64 -d > app/helldivers.keystore
|
||||||
|
env:
|
||||||
|
ANDROIDKEYSTOREPATH: app/helldivers.keystore
|
||||||
|
ANDROIDKEYSTOREPASS: ${{ secrets.ANDROIDKEYSTOREPASS }}
|
||||||
|
ANDROIDKEYALIAS: ${{ secrets.ANDROIDKEYALIAS }}
|
||||||
|
ANDROIDKEYPASS: ${{ secrets.ANDROIDKEYPASS }}
|
||||||
|
|
||||||
|
- name: Build with Gradle
|
||||||
run: |
|
run: |
|
||||||
chmod +x ./gradlew
|
chmod +x ./gradlew
|
||||||
./gradlew assembleRelease --no-daemon -Dorg.gradle.java.home=$JAVA_HOME
|
./gradlew assembleRelease --no-daemon
|
||||||
|
|
||||||
- name: Upload APK
|
- name: Upload APK
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: apk
|
name: apk
|
||||||
path: app/build/outputs/apk/release/*.apk
|
path: app/build/outputs/apk/release/*.apk
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
run: |
|
||||||
|
# Fetch the specific tag from remote
|
||||||
|
git fetch origin tag v0.2.0 --force
|
||||||
|
|
||||||
|
# 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 ==="
|
||||||
|
|||||||
@@ -9,14 +9,24 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.helldivers.app"
|
applicationId "com.helldivers.app"
|
||||||
minSdk 18
|
minSdk 18
|
||||||
targetSdk 21
|
targetSdk 34
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0.0-LIBERTY"
|
versionName "1.0.0-LIBERTY"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signingConfigs {
|
||||||
|
release {
|
||||||
|
storeFile file(System.getenv("ANDROIDKEYSTOREPATH") ?: "helldivers.keystore")
|
||||||
|
storePassword System.getenv("ANDROIDKEYSTOREPASS") ?: "HelldiversPorLaSuPerTierraYKevinTambien"
|
||||||
|
keyAlias System.getenv("ANDROIDKEYALIAS") ?: "helldivers"
|
||||||
|
keyPassword System.getenv("ANDROIDKEYPASS") ?: "HelldiversPorLaSuPerTierraYKevinTambien"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
signingConfig signingConfigs.release
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
@@ -27,14 +37,14 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_21
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
targetCompatibility JavaVersion.VERSION_21
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
coreLibraryDesugaringEnabled true
|
coreLibraryDesugaringEnabled true
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
toolchain {
|
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
47
docker-compose.yml
Normal 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
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user