-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (62 loc) · 2.08 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
64
65
66
67
68
69
70
71
72
name: Android Build and Publish on Release
on:
release:
types: [published]
paths:
- '**/*.apk'
jobs:
build-and-publish:
runs-on: ubuntu-latest
env:
APP_NAME: ${{ github.repository_owner }}_${{ github.event.repository.name }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: '17'
- name: Build AAB
run: |
./gradlew clean
./gradlew bundleRelease --no-daemon --warning-mode all
- name: Sign AAB
id: sign_app_aab
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.ANDROID_KEYSTORE }}
alias: ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "34.0.0"
- name: Copy
run: |
cp app/build/outputs/bundle/release/app-release.aab ${{ env.APP_NAME }}.aab
- name: Build APK
run: |
./gradlew clean
./gradlew assembleRelease --no-daemon --warning-mode all
- name: Sign APK
id: sign_app_apk
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.ANDROID_KEYSTORE }}
alias: ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "34.0.0"
- name: Copy
run: |
cp app/build/outputs/apk/release/app-release-unsigned-signed.apk ${{ env.APP_NAME }}.apk
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
${{ env.APP_NAME }}.apk
${{ env.APP_NAME }}.aab
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}