-
Notifications
You must be signed in to change notification settings - Fork 17
63 lines (50 loc) · 1.72 KB
/
build.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
59
60
61
62
63
name: Build APK
on:
push:
paths-ignore:
- '**.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '21'
- name: Get short commit SHA
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
- name: Build APK (testkey)
run: ./gradlew build
- name: Upload Debug APK (testkey)
uses: actions/upload-artifact@v4
with:
name: OwnDroid-CI-${{ env.SHORT_SHA }}-debug-testkey.apk
path: app/build/outputs/apk/debug/app-debug.apk
- name: Upload Release APK (testkey)
uses: actions/upload-artifact@v4
with:
name: OwnDroid-CI-${{ env.SHORT_SHA }}-release-testkey.apk
path: app/build/outputs/apk/release/app-release.apk
- name: Export key
env:
KEY_BASE64: ${{ secrets.KEY_BASE64 }}
run: echo "$KEY_BASE64" | base64 --decode - > app/signature.jks
- name: Build APK
env:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
run: ./gradlew build
- name: Upload Debug APK
uses: actions/upload-artifact@v4
with:
name: OwnDroid-CI-${{ env.SHORT_SHA }}-debug-signed.apk
path: app/build/outputs/apk/debug/app-debug.apk
- name: Upload Release APK
uses: actions/upload-artifact@v4
with:
name: OwnDroid-CI-${{ env.SHORT_SHA }}-release-signed.apk
path: app/build/outputs/apk/release/app-release.apk