-
-
Notifications
You must be signed in to change notification settings - Fork 647
58 lines (56 loc) · 2.12 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Android test and alpha update
on:
push:
branches: [ main ]
jobs:
build_alpha:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: gradle/gradle-build-action@v3
- name: Check for missing qq strings
run: ./scripts/missing-qq.py
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Build, test, and lint
run: ./gradlew clean checkstyle ktlint assembleAlphaRelease lintAlphaRelease testAlphaRelease
- name: List
run: ls -alR ./app/build/outputs/apk/
- uses: kevin-david/zipalign-sign-android-release@v2
name: Sign APK
id: build_signed
with:
releaseDirectory: app/build/outputs/apk/alpha/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.KEY_STORE_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
# override default build-tools (optional)
BUILD_TOOLS_VERSION: "35.0.0"
- name: Create hash
run: git rev-parse HEAD > app/build/outputs/apk/alpha/release/rev-hash.txt
- name: Rename APK to universal
run: mv app/build/outputs/apk/alpha/release/app-alpha-release-signed.apk app/build/outputs/apk/alpha/release/app-alpha-universal-release.apk
- uses: dev-drprasad/[email protected]
name: Delete latest alpha tag and release
with:
tag_name: latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Sleep for 30 seconds, to allow the tag to be deleted
run: sleep 30s
shell: bash
- uses: ncipollo/[email protected]
name: Create new tag and release and upload artifacts
with:
name: latest
commit: main
tag: latest
artifacts: "app/build/outputs/apk/alpha/release/app-alpha-universal-release.apk,app/build/outputs/apk/alpha/release/rev-hash.txt"
body: This is the latest Alpha version of the app (autogenerated).
token: ${{ secrets.GITHUB_TOKEN }}