-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (35 loc) · 1.11 KB
/
android.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
name: Android Build APK
on:
push:
branches: [ "master" ]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: assembleDebug
dependency-graph: generate-and-submit
artifact-retention-days: 7
- name: Push release
run: |
git init
git config user.name "github-actions"
git config user.email "41898282+github-actions@users.noreply.github.com"
git remote add origin "https://${{github.actor}}:${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}"
git checkout -b apk
git add *.apk
git commit -m "Build debug APK for $GITHUB_SHA"
git push -f -u origin apk
working-directory: app/build/outputs/apk/debug