diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml
index 8277c72..86a821a 100644
--- a/.github/workflows/android.yml
+++ b/.github/workflows/android.yml
@@ -10,6 +10,7 @@ jobs:
build:
runs-on: ubuntu-latest
+ environment: BuildAPK
steps:
- uses: actions/checkout@v4
@@ -24,6 +25,18 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew
+ - name: Send notification to Telegram
+ run: |
+ if [[ -n "${{ secrets.TELEGRAM_BOT_TOKEN }}" ]]; then
+ for chat in \
+ "-d chat_id=${{ secrets.TELEGRAM_CHAT_ID }} -d message_thread_id=13762" \
+ "-d chat_id=${{ secrets.TELEGRAM_CHAT_ID_VEC }}"; do
+ curl -s -o /dev/null -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
+ $chat \
+ -d $'text=New update available on GitHub repository and building APK.\nPlease wait about 5 minutes.\nRun ID: '${GITHUB_RUN_ID}
+ done
+ fi
+
- name: Build Debug APK
run: ./gradlew assembleDebug
@@ -41,3 +54,52 @@ jobs:
with:
name: android-release-apk
path: app/build/outputs/apk/release/app-release.apk
+
+ - name: Upload to Telegram
+ run: |
+ if [[ -n "${{ secrets.TELEGRAM_BOT_TOKEN }}" ]]; then
+ success=true
+
+ for file in app/build/outputs/apk/release/*.apk; do
+ echo "Uploading $(basename "$file")"
+ tries=0
+ success_file=false
+ until [ $tries -ge 5 ]; do
+ success_targets=false
+ for target in \
+ "-F chat_id=${{ secrets.TELEGRAM_CHAT_ID }} -F message_thread_id=13762" \
+ "-F chat_id=${{ secrets.TELEGRAM_CHAT_ID_VEC }}"; do
+
+ if curl -s -o /dev/null -F document=@"$file" $target \
+ -F $'caption=Done! Note that this is a version that is automatically built when there are changes in the GitHub repository, not the official version. Please only install it if you really want to see what is new.\nRun ID: '${GITHUB_RUN_ID} \
+ https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendDocument; then
+ success_targets=true
+ else
+ echo "Retrying upload for $file to target..."
+ sleep 2
+ fi
+ done
+
+ if $success_targets; then
+ success_file=true
+ break
+ fi
+ tries=$((tries+1))
+ done
+
+ if ! $success_file; then
+ echo "Upload failed for $file"
+ success=false
+ fi
+ done
+
+ if [ "$success" = false ]; then
+ for chat in \
+ "-d chat_id=${{ secrets.TELEGRAM_CHAT_ID }} -d message_thread_id=13762" \
+ "-d chat_id=${{ secrets.TELEGRAM_CHAT_ID_VEC }}"; do
+ curl -s -o /dev/null -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
+ $chat \
+ -d $'text=Something went wrong and the APK file could not be uploaded.\nRun ID: '${GITHUB_RUN_ID}
+ done
+ fi
+ fi
diff --git a/.github/workflows/fastlane.yml b/.github/workflows/fastlane.yml
deleted file mode 100644
index 74eaded..0000000
--- a/.github/workflows/fastlane.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-name: Fastlane
-
-on:
- push:
- branches: [ main ]
- pull_request:
-
-jobs:
- fastlane:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - name: Set up Ruby
- uses: ruby/setup-ruby@v1
- with:
- ruby-version: '3.2'
- - name: Install dependencies
- run: |
- gem install bundler
- bundle install || gem install fastlane
- - name: Run Fastlane
- run: fastlane metadata
-
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index b2f1137..e071c54 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -11,7 +11,7 @@ android {
minSdk minApi
targetSdk targetApi
versionCode 21
- versionName "v2.9.5.8-3dfx"
+ versionName "v2.9.5.9-3dfx"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
@@ -62,8 +62,8 @@ android {
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_17
- targetCompatibility JavaVersion.VERSION_17
+ sourceCompatibility JavaVersion.VERSION_21
+ targetCompatibility JavaVersion.VERSION_21
}
buildToolsVersion '35.0.1'
ndkVersion '21'
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index f2bec1c..8b8b4fe 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -3,7 +3,7 @@