forked from shiveshnavin/apk-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (46 loc) · 1.36 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: APK Builder
on:
workflow_dispatch:
inputs:
target_repo:
description: 'Target github repo'
required: true
default: 'shiveshnavin/instagram-automation-app'
target_branch:
description: 'Target github branch'
required: true
default: 'main'
gradle_wrapper_version:
description: 'Gradle Wrapper version'
required: true
default: '7.0.2'
env:
gradle_wrapper_version: ${{ github.event.inputs.gradle_wrapper_version }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.inputs.target_repo }}
path: ${{ github.event.inputs.target_branch }}
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: List checked out files
run: ls
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Get gradle wrapper
run: gradle wrapper --gradle-version $gradle_wrapper_version
- name: Build Android App
run: sh gradlew assembleDebug
- name: Save APK
uses: actions/upload-artifact@v3
with:
name: output.apk
path: |
app/build/outputs/apk/debug/app-debug.apk