From a7231a8530a2906e7faa426f679330cc9ecac27a Mon Sep 17 00:00:00 2001 From: Vijay Soni Date: Wed, 9 Jul 2025 23:27:48 +0530 Subject: [PATCH 1/7] Create release.yml --- .github/workflows/release.yml | 60 +++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..898be840 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,60 @@ +name: Release APK + +on: + push: + tags: + - 'v*.*.*' # Triggers for tags like v1.0.0 + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 17 + + - name: Grant execute permission for Gradlew + run: chmod +x ./gradlew + + - name: Build APK + run: ./gradlew assembleRelease + + # Optional: Sign APK (requires secrets) + # - name: Sign APK + # uses: r0adkll/sign-android-release@v1 + # with: + # releaseDirectory: app/build/outputs/apk/release + # signingKeyBase64: ${{ secrets.SIGNING_KEY }} + # alias: ${{ secrets.ALIAS }} + # keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} + # keyPassword: ${{ secrets.KEY_PASSWORD }} + + - name: Upload APK as artifact + uses: actions/upload-artifact@v4 + with: + name: app-release-apk + path: app/build/outputs/apk/release/app-release.apk + + release: + needs: build + runs-on: ubuntu-latest + + steps: + - name: Download APK artifact + uses: actions/download-artifact@v4 + with: + name: app-release-apk + path: . + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + files: app-release.apk + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From cdda739075c84a2eb4ed7953d5aae491a6e63d35 Mon Sep 17 00:00:00 2001 From: Vijay Soni Date: Wed, 9 Jul 2025 23:28:09 +0530 Subject: [PATCH 2/7] Update release.yml --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 898be840..5810ad71 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,7 @@ name: Release APK on: + workflow_dispatch: push: tags: - 'v*.*.*' # Triggers for tags like v1.0.0 From e78e105b7b39068b5c8fc6ed8eab7d08faae7d98 Mon Sep 17 00:00:00 2001 From: Vijay Soni Date: Wed, 9 Jul 2025 23:33:56 +0530 Subject: [PATCH 3/7] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5810ad71..706e1d64 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: app-release-apk - path: app/build/outputs/apk/release/app-release.apk + path: app/build/outputs/apk/release/*.apk release: needs: build From c7c0c363d5995d1304236167393e0ce2250f51a6 Mon Sep 17 00:00:00 2001 From: Vijay Soni Date: Wed, 9 Jul 2025 23:34:57 +0530 Subject: [PATCH 4/7] Update release.yml --- .github/workflows/release.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 706e1d64..8badb8bc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,6 +26,18 @@ jobs: - name: Build APK run: ./gradlew assembleRelease + - name: DEBUG + run: | + set -x + + pwd + + ls -all + + cd app/build/outputs/ + ls -all + tree + # Optional: Sign APK (requires secrets) # - name: Sign APK # uses: r0adkll/sign-android-release@v1 From ad7a4c68555d8e5f297c922c629a0a8fd99dfb99 Mon Sep 17 00:00:00 2001 From: Vijay Soni Date: Wed, 9 Jul 2025 23:49:39 +0530 Subject: [PATCH 5/7] Update release.yml --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8badb8bc..9d9953ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Release APK +name: Release on: workflow_dispatch: @@ -25,6 +25,10 @@ jobs: - name: Build APK run: ./gradlew assembleRelease + + - name: Rename APK + run: | + mv app/build/outputs/apk/release/app-release-unsigned.apk app/build/outputs/apk/release/bitchat.apk - name: DEBUG run: | From cd95891063296c74f8916b94241144c80712d61d Mon Sep 17 00:00:00 2001 From: Vijay Soni Date: Thu, 10 Jul 2025 00:01:39 +0530 Subject: [PATCH 6/7] Update release.yml --- .github/workflows/release.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9d9953ba..81ba7569 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,6 +20,16 @@ jobs: distribution: temurin java-version: 17 + - name: Cache Gradle files + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + gradle-${{ runner.os }}- + - name: Grant execute permission for Gradlew run: chmod +x ./gradlew @@ -72,6 +82,6 @@ jobs: - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: - files: app-release.apk + files: bitchat.apk env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 05c63f1d179bdc93f05b81234e3b215d1c69bcc9 Mon Sep 17 00:00:00 2001 From: Vijay Soni Date: Thu, 10 Jul 2025 00:11:56 +0530 Subject: [PATCH 7/7] changes --- .github/workflows/release.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 81ba7569..4b3b8b7b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,6 +19,11 @@ jobs: with: distribution: temurin java-version: 17 + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + with: + gradle-version: wrapper - name: Cache Gradle files uses: actions/cache@v3 @@ -34,7 +39,12 @@ jobs: run: chmod +x ./gradlew - name: Build APK - run: ./gradlew assembleRelease + run: ./gradlew assembleRelease --no-daemon --stacktrace + + - name: List APK files + run: | + echo "APK files built:" + find app/build/outputs/apk/release -name "*.apk" -type f - name: Rename APK run: | @@ -65,8 +75,10 @@ jobs: - name: Upload APK as artifact uses: actions/upload-artifact@v4 with: - name: app-release-apk + name: bitchat-release-apk-${{ github.ref_name }} path: app/build/outputs/apk/release/*.apk + retention-days: 30 + if-no-files-found: error release: needs: build @@ -76,12 +88,13 @@ jobs: - name: Download APK artifact uses: actions/download-artifact@v4 with: - name: app-release-apk + name: bitchat-release-apk-${{ github.ref_name }} path: . - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: files: bitchat.apk + name: Release ${{ github.ref_name }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}