Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build

env:
Artifacts: Android/app/build/outputs/apk/debug/app-debug.apk
Branch: ${{github.ref_name}}
GH_TOKEN: ${{ github.token }}

on:
push:
Branches: $Branch
pull_request:
Branches: $Branch
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Clone repo and submodules
run: git clone --recurse-submodules https://github.com/${{github.repository}}.git . --branch ${{env.Branch}}

- name: Get current date, commit hash and count
run: |
echo "CommitDate=$(git show -s --date=format:'%Y-%m-%d' --format=%cd)" >> $GITHUB_ENV
echo "CommitHashShort=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
echo "CommitCount=$(git rev-list --count HEAD)" >> $GITHUB_ENV

- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: |
cd Android
chmod +x gradlew

- name: Build with Gradle
run: |
cd Android
./gradlew build --warning-mode all

- name: Upload Artifact to GitHub
uses: actions/upload-artifact@v4
with:
name: "${{github.event.repository.name}}_r${{env.CommitCount}}@${{env.CommitHashShort}}"
path: "${{github.workspace}}/${{env.Artifacts}}"

- name: Release
run: |
gh release create r${{env.CommitCount}} --generate-notes --latest=false --title "[${{env.CommitDate}}] ${{github.event.repository.name}} r${{env.CommitCount}}@${{env.CommitHashShort}}"
gh release upload r${{env.CommitCount}} "${{env.Artifacts}}"
3 changes: 3 additions & 0 deletions Android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ android {
path 'src/main/jni/CMakeLists.txt'
}
}
lintOptions {
abortOnError false
}
}

dependencies {
Expand Down