@@ -37,11 +37,47 @@ jobs:
3737 versionCode : ${{ steps.get_version.outputs.VERSION_CODE }}
3838 versionName : ${{ steps.get_version.outputs.VERSION_NAME }}
3939
40+ - name : Configure Build Signing
41+ run : |
42+ if [ ! -z "${{ secrets.SIGNING_KEY }}" ]; then
43+ echo "storePassword='${{ secrets.KEY_STORE_PASSWORD }}'" > smarttubetv/keystore.properties
44+ echo "keyAlias='${{ secrets.ALIAS }}'" >> smarttubetv/keystore.properties
45+ echo "keyPassword='${{ secrets.KEY_PASSWORD }}'" >> smarttubetv/keystore.properties
46+ echo "storeFile='../key.jks'" >> smarttubetv/keystore.properties
47+ echo "${{ secrets.SIGNING_KEY }}" | base64 --decode > key.jks
48+ fi
49+
4050 - name : Build with Gradle
4151 run : |
4252 chmod +x gradlew
4353 ./gradlew clean assembleStbetaDebug
4454
55+ - name : VirusTotal Scan
56+ id : vt
57+ uses : crazy-max/ghaction-virustotal@v4
58+ with :
59+ vt_api_key : ${{ secrets.VIRUS_TOTAL_API_KEY }}
60+ files : |
61+ ./smarttubetv/build/outputs/apk/stbeta/debug/*.apk
62+ request_rate : 3
63+
64+ - name : VirusTotal Summary
65+ run : |
66+ echo "### Security Scan Results" >> $GITHUB_STEP_SUMMARY
67+ echo "| Artifact Name | VirusTotal Status | Detailed Report |" >> $GITHUB_STEP_SUMMARY
68+ echo "| :--- | :--- | :--- |" >> $GITHUB_STEP_SUMMARY
69+
70+ for apk in ./smarttubetv/build/outputs/apk/stbeta/debug/*.apk; do
71+ filename=$(basename "$apk")
72+ sha256=$(sha256sum "$apk" | awk '{print $1}')
73+
74+ # Construct the dynamic badge URL using the hash
75+ badge_url="https://badges.cssnr.com/vt/id/$sha256?start=green&end=red&n=8"
76+ vt_link="https://www.virustotal.com/gui/file/$sha256"
77+
78+ echo "| $filename |  | [View Report]($vt_link) |" >> $GITHUB_STEP_SUMMARY
79+ done
80+
4581 - name : Upload ARM64 APK
4682 uses : actions/upload-artifact@v6
4783 with :
0 commit comments