android_build #43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: android_build | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- id: get-project | |
name: Get project name | |
run: echo "::set-output name=PROJECT::$(cat project-to-build)" | |
- name: Clone project | |
run: git clone --depth=1 ${{ steps.get-project.outputs.PROJECT }} project | |
- name: Build the app | |
working-directory: ./project | |
run: | | |
if [ ! -f "gradlew" ]; then gradle wrapper; fi | |
chmod +x gradlew | |
./gradlew assembleDebug --stacktrace | |
- name: Upload APK | |
uses: actions/upload-artifact@v2 | |
with: | |
name: my-build-apk | |
path: ./**/*.apk | |