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 @@ Vectras VM - v2.9.5.8-3dfx + v2.9.5.9-3dfx Stable Home Logger diff --git a/web/data/UpdateConfig.json b/web/data/UpdateConfig.json index b446a18..fd4f710 100644 --- a/web/data/UpdateConfig.json +++ b/web/data/UpdateConfig.json @@ -1,15 +1,15 @@ { "versionCode":"21", - "versionName":"v2.9.5-3dfx,v2.9.5-3dfx-almondcake,v2.9.5-3dfx-bread,v2.9.5-3dfx-churro,v2.9.5-3dfx-doughnut,v2.9.5-3dfx-empanada,v2.9.5-3dfx-flan,v2.9.5-3dfx-gugelhupf,v2.9.5-3dfx-hamentaschen,v2.9.5-3dfx-italianice,v2.9.5-3dfx-ladyfingers,v2.9.5-3dfx-madeleine,v2.9.5-3dfx-neapolitanicecream,v2.9.5-3dfx-orangecake,v2.9.5-3dfx-profiterole,v2.9.5-3dfx-quincejelly,v2.9.5-3dfx-rugelach,v2.9.5-3dfx-scone,v2.9.5-3dfx-tart,v2.9.5-3dfx-ube-halaya,v2.9.5-3dfx-victoria-sponge,v2.9.5-3dfx-waffle,v2.9.5-3dfx-xangos,v2.9.5-3dfx-yorkshire-pudding,v2.9.5-3dfx-zeppole,v2.9.5.1-3dfx,v2.9.5.2-3dfx,v2.9.5.3-3dfx,v2.9.5.4-3dfx,v2.9.5.5-3dfx,v2.9.5.6-3dfx,v2.9.5.7-3dfx,v2.9.5.8-3dfx", + "versionName":"v2.9.5-3dfx,v2.9.5-3dfx-almondcake,v2.9.5-3dfx-bread,v2.9.5-3dfx-churro,v2.9.5-3dfx-doughnut,v2.9.5-3dfx-empanada,v2.9.5-3dfx-flan,v2.9.5-3dfx-gugelhupf,v2.9.5-3dfx-hamentaschen,v2.9.5-3dfx-italianice,v2.9.5-3dfx-ladyfingers,v2.9.5-3dfx-madeleine,v2.9.5-3dfx-neapolitanicecream,v2.9.5-3dfx-orangecake,v2.9.5-3dfx-profiterole,v2.9.5-3dfx-quincejelly,v2.9.5-3dfx-rugelach,v2.9.5-3dfx-scone,v2.9.5-3dfx-tart,v2.9.5-3dfx-ube-halaya,v2.9.5-3dfx-victoria-sponge,v2.9.5-3dfx-waffle,v2.9.5-3dfx-xangos,v2.9.5-3dfx-yorkshire-pudding,v2.9.5-3dfx-zeppole,v2.9.5.1-3dfx,v2.9.5.2-3dfx,v2.9.5.3-3dfx,v2.9.5.4-3dfx,v2.9.5.5-3dfx,v2.9.5.6-3dfx,v2.9.5.7-3dfx,v2.9.5.8-3dfx,v2.9.5.9-3dfx", "size": "46 MB", "url": "https://github.com/xoureldeen/Vectras-VM-Android/releases/v2.9.5", "Message": "

v2.9.5-3dfx



New updates are live!", "cancellable": true, "versionCodeBeta":"21", - "versionNameBeta":"v2.9.5.8-3dfx", - "versionNameBetas":"v2.9.5-3dfx-madeleine,v2.9.5-3dfx-neapolitanicecream,v2.9.5-3dfx-orangecake,v2.9.5-3dfx-profiterole,v2.9.5-3dfx-quincejelly,v2.9.5-3dfx-rugelach,v2.9.5-3dfx-scone,v2.9.5-3dfx-tart,v2.9.5-3dfx-victoria-sponge,v2.9.5-3dfx-waffle,v2.9.5-3dfx-xangos,v2.9.5-3dfx-yorkshire-pudding,v2.9.5-3dfx-zeppole,v2.9.5.1-3dfx,v2.9.5.2-3dfx,v2.9.5.3-3dfx,v2.9.5.4-3dfx,v2.9.5.5-3dfx,v2.9.5.6-3dfx,v2.9.5.7-3dfx,v2.9.5.8-3dfx", + "versionNameBeta":"v2.9.5.9-3dfx", + "versionNameBetas":"v2.9.5-3dfx-madeleine,v2.9.5-3dfx-neapolitanicecream,v2.9.5-3dfx-orangecake,v2.9.5-3dfx-profiterole,v2.9.5-3dfx-quincejelly,v2.9.5-3dfx-rugelach,v2.9.5-3dfx-scone,v2.9.5-3dfx-tart,v2.9.5-3dfx-victoria-sponge,v2.9.5-3dfx-waffle,v2.9.5-3dfx-xangos,v2.9.5-3dfx-yorkshire-pudding,v2.9.5-3dfx-zeppole,v2.9.5.1-3dfx,v2.9.5.2-3dfx,v2.9.5.3-3dfx,v2.9.5.4-3dfx,v2.9.5.5-3dfx,v2.9.5.6-3dfx,v2.9.5.7-3dfx,v2.9.5.8-3dfx,v2.9.5.9-3dfx", "sizeBeta": "41 MB", "urlBeta": "https://github.com/AnBui2004/Vectras-VM-Emu-Android/releases", - "MessageBeta": "

v2.9.5.8-3dfx

Bugs fixed.", + "MessageBeta": "

v2.9.5.9-3dfx

Bugs fixed.", "cancellableBeta": true }