Skip to content

ci: 👷 remove move jks file action #2

ci: 👷 remove move jks file action

ci: 👷 remove move jks file action #2

name: 🚀 Android CI
on:
push:
branches:
- main
pull_request:
branches:
- main
- dev
branch_protection_rule:
types: [created, completed]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout Source Code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}
- name: 🛠️ Setup Android-OpenCV-SDK
run: ./setupOpenCV.sh
- name: ☕ Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17.X
- name: 🧹 Run Android Lint
run: ./gradlew lint
- name: 📝 Post Lint Results
uses: actions/github-script@v5
if: always()
with:
script: |
const fs = require('fs');
const lintResult = fs.readFileSync('./app/build/reports/lint-results.xml', 'utf8');
const issueComment = `
## Lint Results 🧹
\`\`\`
${lintResult}
\`\`\`
`;
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: issueComment,
});
- name: 🐞 Debug Build
run: ./gradlew assembleDebug
- name: 🚀 Release Build
run: ./gradlew build --no-daemon --console=plain
- name: 📤 Upload Debug APK
uses: actions/upload-artifact@v4
with:
name: debug apk
path: app/build/outputs/apk/debug/app-debug.apk