Tom Powell | e495da5 | 2023-09-16 16:19:29 -0700 | [diff] [blame] | 1 | name: gerrit checks |
| 2 | |
| 3 | on: |
| 4 | workflow_dispatch: |
| 5 | inputs: |
| 6 | ref: |
| 7 | type: string |
| 8 | gerrit-ref: |
| 9 | type: string |
| 10 | change: |
| 11 | type: string |
| 12 | |
| 13 | jobs: |
| 14 | build: |
| 15 | runs-on: ubuntu-latest |
| 16 | steps: |
Tom Powell | 0a4c3a6 | 2023-09-16 16:25:01 -0700 | [diff] [blame^] | 17 | - uses: lineageos-infra/fetch-gerrit-change@main |
| 18 | with: |
| 19 | repository: ${{ github.repository }} |
| 20 | gerrit-ref: ${{ inputs.gerrit-ref }} |
| 21 | ref: ${{ inputs.ref }} |
Tom Powell | e495da5 | 2023-09-16 16:19:29 -0700 | [diff] [blame] | 22 | |
| 23 | - name: Setup JDK 17 |
| 24 | uses: actions/setup-java@v3 |
| 25 | with: |
| 26 | distribution: 'zulu' |
| 27 | java-version: 17 |
| 28 | |
| 29 | - name: Build with Gradle |
| 30 | run: ./gradlew assembleDebug |
| 31 | |
| 32 | - name: Generate Android.bp |
| 33 | run: | |
| 34 | ./gradlew app:generateBp |
| 35 | if [[ ! -z $(git status -s) ]]; then |
| 36 | git status |
| 37 | exit -1 |
| 38 | fi |
| 39 | |
| 40 | - uses: actions/upload-artifact@v3 |
| 41 | with: |
| 42 | name: app-debug.apk |
| 43 | path: app/build/outputs/apk/debug/app-debug.apk |