Skip to content

Play: Update deprecated ruby step #430

Play: Update deprecated ruby step

Play: Update deprecated ruby step #430

Workflow file for this run

name: Android CI
on:
push:
branches: [ "kotlin" ]
#pull_request:
# branches: [ "kotlin" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Initialize repo
run: |
git config --global user.name "sounddrill31"
git config --global user.email "sounddrill31@gmail.com"
id: pwd
- name: Versioning
run: |
sed -i "s/private val buildRunId: Long = 0/private val buildRunId: Long = ${{ github.run_id }}/" app/src/main/java/com/zeusinstitute/upiapp/Update.kt
grep "private val buildRunId" app/src/main/java/com/zeusinstitute/upiapp/Update.kt
# - name: Branding
# run: |
# #Updater
# sed -i 's/android:label="UPI Viewer"/android:label="Zeus UPI - DIY SoundBox"/g' app/src/main/res/navigation/nav_graph.xml
#
# # Nav graph
# echo "Listing Navigation Labels"
# grep "android:label=" app/src/main/res/navigation/nav_graph.xml
#
# # Strings
# sed -i 's/<string name="app_name">UPI Viewer<\/string>/<string name="app_name">Zeus UPI<\/string>/g' app/src/main/res/values/strings.xml
#
# echo "Listing String App name"
# grep "app_name" app/src/main/res/values/strings.xml
#
# # TTS
# sed -i 's/val announcementMessage = "\${if (type == "Credit") "Received" else "Sent"} Rupees \$amount"/val announcementMessage = "\${if (type == "Credit") "Received" else "Sent"} Rupees \$amount on Zeus UPI"/g' app/src/main/java/com/zeusinstitute/upiapp/SMSService.kt
# echo "Listing TTS Command"
# grep "Rupees" app/src/main/java/com/zeusinstitute/upiapp/SMSService.kt
#
# # About App
# sed -i 's/android:text="UPI Viewer App/android:text="Zeus UPI Viewer App/g' app/src/main/res/layout/fragment_about_app.xml
# echo "Listing App Description command"
# grep "UPI Viewer App" app/src/main/res/layout/fragment_about_app.xml
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew assembleDebug
- name: Get Build Tool Version
shell: bash
run: |
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV
echo Last build tool version is: $BUILD_TOOL_VERSION
- name: Sign apk
uses: r0adkll/sign-android-release@v1
id: sign_app
with:
releaseDirectory: app/build/outputs/apk/debug
signingKeyBase64: ${{ secrets.SIGNINGKEYBASE64 }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }}
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: App-Artifact
path: |
app/build/outputs/apk/*/*.apk
- name: Upload to Release
uses: xresloader/upload-to-github-release@v1
with:
file: |
app/build/outputs/apk/*/*.apk
default_release_name: Bleeding Edge ${{ github.run_id }} ${{ github.event.head_commit.timestamp }}
tag_name: ${{ github.run_id }}
draft: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}