From 97a21fe405acef56d44e4ffae23e33fa30f7ffb1 Mon Sep 17 00:00:00 2001 From: deniscerri <64997243+deniscerri@users.noreply.github.com> Date: Sun, 1 Sep 2024 10:09:34 +0200 Subject: [PATCH 1/4] Update android.yml --- .github/workflows/android.yml | 48 ++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 1598bbff..0c0adfae 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -12,18 +12,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: send telegram message on push or pull - uses: appleboy/telegram-action@master - with: - to: ${{ secrets.TELEGRAM_TO }} - token: ${{ secrets.TELEGRAM_TOKEN }} - message: | - ${{ github.actor }} created commit: - Commit message: ${{ github.event.commits[0].message }} - - Repository: ${{ github.repository }} - - See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}} - uses: actions/checkout@v3 - name: set up JDK 17 uses: actions/setup-java@v3 @@ -41,3 +29,39 @@ jobs: run: chmod +x gradlew - name: Build with Gradle run: ./gradlew build + - name: Set current date as env variable + run: echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV + # Create APK Debug + - name: Build apk debug project (APK) + run: ./gradlew assembleDebug + # Create APK Release + - name: Build apk release project (APK) + run: ./gradlew assemble + # Upload Artifact Build + # Noted For Output [main_project_module]/build/outputs/apk/debug/ + - name: Upload APK Debug + uses: actions/upload-artifact@v3 + with: + name: YTDLnis APK debug generated + path: ${{ env.main_project_module }}/build/outputs/apk/debug/ + + # Noted For Output [main_project_module]/build/outputs/apk/release/ + - name: Upload APK Release - ${{ env.repository_name }} + uses: actions/upload-artifact@v3 + with: + name: YTDLnis APK release generated + path: ${{ env.main_project_module }}/build/outputs/apk/release/ + - name: send telegram message on push or pull + uses: appleboy/telegram-action@master + with: + to: ${{ secrets.TELEGRAM_TO }} + token: ${{ secrets.TELEGRAM_TOKEN }} + message: | + ${{ github.actor }} created commit: + Commit message: ${{ github.event.commits[0].message }} + + Repository: ${{ github.repository }} + + See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}} + See generated debug apk: https://github.com/${{ github.repository }}/build/outputs/apk/debug/ + See generated release apk: https://github.com/${{ github.repository }}/build/outputs/apk/release/ From da857b5b5c9de48e362292c74c33e1644b569a0d Mon Sep 17 00:00:00 2001 From: deniscerri <64997243+deniscerri@users.noreply.github.com> Date: Sun, 1 Sep 2024 10:24:28 +0200 Subject: [PATCH 2/4] Update android.yml --- .github/workflows/android.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 0c0adfae..48c20d8a 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -1,5 +1,9 @@ name: Android CI +env: + # The name of the main module repository + main_project_module: app + on: push: branches: [ "main" ] @@ -46,7 +50,7 @@ jobs: path: ${{ env.main_project_module }}/build/outputs/apk/debug/ # Noted For Output [main_project_module]/build/outputs/apk/release/ - - name: Upload APK Release - ${{ env.repository_name }} + - name: Upload APK Release uses: actions/upload-artifact@v3 with: name: YTDLnis APK release generated @@ -63,5 +67,3 @@ jobs: Repository: ${{ github.repository }} See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}} - See generated debug apk: https://github.com/${{ github.repository }}/build/outputs/apk/debug/ - See generated release apk: https://github.com/${{ github.repository }}/build/outputs/apk/release/ From d551299c8b0cf246b6b18b84db0dfdf26bbcb319 Mon Sep 17 00:00:00 2001 From: deniscerri <64997243+deniscerri@users.noreply.github.com> Date: Sun, 1 Sep 2024 11:07:02 +0200 Subject: [PATCH 3/4] Update android.yml --- .github/workflows/android.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 48c20d8a..5a3c8a35 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -27,8 +27,12 @@ jobs: - uses: gradle/gradle-build-action@v2 with: gradle-version: 7.5 + - name: Create jks.asc file + run: echo "${{ secrets.BASE_64_SIGNING_KEY }}" > release_keystore.jks.asc + - name: Create jks file + run: gpg -d -passphrase "${{ secrets.BASE_64_SIGNING_KEY_PASSPHRASE }}" -batch release_keystore.jks.asc > app/release_keystore.jks - name: Create Properties File - run: touch local.properties + run: echo "${{ secrets.LOCAL_PROPERTIES }}" > local.properties - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle From 191b9159469fc39f405a5c55bf2cd43458425f5c Mon Sep 17 00:00:00 2001 From: deniscerri <64997243+deniscerri@users.noreply.github.com> Date: Sun, 1 Sep 2024 11:37:56 +0200 Subject: [PATCH 4/4] Update android.yml --- .github/workflows/android.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 5a3c8a35..3f14546f 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -27,10 +27,10 @@ jobs: - uses: gradle/gradle-build-action@v2 with: gradle-version: 7.5 - - name: Create jks.asc file - run: echo "${{ secrets.BASE_64_SIGNING_KEY }}" > release_keystore.jks.asc + - name: Create base64 jks file + run: echo "${{ secrets.BASE_64_SIGNING_KEY }}" > app/release_keystore.txt - name: Create jks file - run: gpg -d -passphrase "${{ secrets.BASE_64_SIGNING_KEY_PASSPHRASE }}" -batch release_keystore.jks.asc > app/release_keystore.jks + run: base64 -d "app/release_keystore.txt" > app/release_keystore.jks - name: Create Properties File run: echo "${{ secrets.LOCAL_PROPERTIES }}" > local.properties - name: Grant execute permission for gradlew