Skip to content

feat: UI Home Search #197

feat: UI Home Search

feat: UI Home Search #197

Workflow file for this run

on:
push:
branches:
- main
- 'feat/*'
- 'dev/*'
pull_request:
branches:
- main
- 'feat/*'
- 'dev/*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ 17 ]
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
cache: gradle
- name: Cache Gradle dependencies
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-jdk-${{ matrix.java-version }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-${{ runner.os }}-jdk-${{ matrix.java-version }}-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Verify Checksum
run: |
sha256sum app/build.gradle.kts > checksum.txt
sha256sum app/src/main/java/com/pwhs/**/*.kt > checksum.txt
- name: Upload checksum results
uses: actions/upload-artifact@v4
with:
name: checksum-results
path: checksum.txt
- name: Build with Gradle
run: ./gradlew build
- name: Run Tests
run: ./gradlew test
- name: Upload APK
if: success()
uses: actions/upload-artifact@v4
with:
name: app
path: app/build/outputs/**/*.apk
- name: Send Telegram Notification on Success
if: success()
run: |
curl -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
-d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
-d text="🎉 <b>Build Successful!</b> 🎉%0A<b>Project</b>: 🚀 <a href='https://github.com/${{ github.repository }}'>${{ github.repository }}</a>%0A<b>Committer</b>: 👤 ${{ github.actor }}%0A<b>Message</b>: 💬 ${{ github.event.head_commit.message }}%0A<b>Branch</b>: 🌿 <code>${{ github.ref_name }}</code>%0A<b>Changes</b>: 🔗 <a href='https://github.com/${{ github.repository }}/commit/${{ github.sha }}'>View Changes</a>%0A<b>Workflow</b>: 📄 <a href='https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'>Details</a>%0A<b>Deployed At</b>: 🌐 <a href='https://api.nqmgaming.nl'>QuickMem Server</a>" \
-d parse_mode="HTML"
- name: Send Telegram Notification on Failure
if: failure()
run: |
curl -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
-d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
-d text="⚠️ <b>Build Failed!</b> ⚠️%0A<b>Project</b>: 🚀 <a href='https://github.com/${{ github.repository }}'>${{ github.repository }}</a>%0A<b>Committer</b>: 👤 ${{ github.actor }}%0A<b>Message</b>: 💬 ${{ github.event.head_commit.message }}%0A<b>Branch</b>: 🌿 <code>${{ github.ref_name }}</code>%0A<b>Changes</b>: 🔗 <a href='https://github.com/${{ github.repository }}/commit/${{ github.sha }}'>View Changes</a>%0A<b>Workflow</b>: 📄 <a href='https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'>Details</a>%0A<b>Error Details</b>: ❌ Check logs for more information." \
-d parse_mode="HTML"