-
Notifications
You must be signed in to change notification settings - Fork 147
48 lines (38 loc) · 1.19 KB
/
release.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
48
name: Release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
# ref: https://github.com/marketplace/actions/automated-build-android-app-with-github-action
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 5
- name: set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'oracle'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Print generated version
run: ./gradlew --quiet androidGitVersion
- name: Build with Gradle
run: ./gradlew build
- name: Build apk debug project (APK)
run: ./gradlew packageDebugAndroidTest
- name: Copy Apks to dist folder
run: |
rm -fr dist && mkdir -p dist
mv app/build/outputs/apk/debug/app-debug.apk dist/app-uiautomator.apk
mv app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk dist/app-uiautomator-test.apk
- name: Publish APKs
run: |
gh release create ${{ github.ref_name }} --notes "release"
gh release upload ${{ github.ref_name }} dist/*
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}