android_build #22
This file contains hidden or 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@v4 | |
| - name: Set up JDK | |
| uses: actions/[email protected] | |
| with: | |
| java-version: 17.0.10 | |
| distribution: 'microsoft' | |
| - id: get-project | |
| name: Get project name | |
| run: echo "PROJECT::$(cat project-to-build)" >> $GITHUB_OUTPUT | |
| - 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 | |