Skip to content

chore(deps): update actions/setup-java action to v4.3.0 #167

chore(deps): update actions/setup-java action to v4.3.0

chore(deps): update actions/setup-java action to v4.3.0 #167

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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/cache@v4
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: github.event_name == 'pull_request'
# with:
# script: |
# const fs = require('fs');
# const lintResult = fs.readFileSync('./app/lint-results.xml', 'utf8');
# const issueComment = `
# ## Lint Results 🧹
# \`\`\`
# ${lintResult}
# \`\`\`
# `;
# github.rest.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