-
-
Notifications
You must be signed in to change notification settings - Fork 4
99 lines (99 loc) · 3.3 KB
/
build.yaml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: oracle
- name: Build the APK
run: ./gradlew assRU
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: apk
path: app/build/outputs/apk/releaseUnsigned/app-releaseUnsigned-unsigned.apk
- name: Build the APP Bundle
run: ./gradlew app:bundleReleaseUnsigned
- name: Debug
run: |
ls -l app/build/outputs/bundle/
ls -l app/build/outputs/bundle/releaseUnsigned
- name: Upload APP Bundle
uses: actions/upload-artifact@v4
with:
name: bundle
path: app/build/outputs/bundle/releaseUnsigned/app-releaseUnsigned.aab
release:
name: Release APK
needs: build
runs-on: ubuntu-latest
steps:
- name: Prepare release folder
run: mkdir -p release
- name: Download APK from build
uses: actions/[email protected] # This version also unzips the content
with:
name: apk
path: ./release
- name: Download Bundle from build
uses: actions/[email protected] # This version also unzips the content
with:
name: bundle
path: ./release
- name: Debug
run: ls -l ./release
- name: Setup build tool version variable
shell: bash
run: |
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV
echo Last build tool version is: $BUILD_TOOL_VERSION
- uses: r0adkll/sign-android-release@v1
name: Sign app AAB
id: sign_app
with:
releaseDirectory: ./release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prerelease: false
draft: false
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
- name: Upload Release APK
id: upload_release_apk
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: release/app-releaseUnsigned-unsigned-signed.apk
asset_name: MerossPairer.apk
asset_content_type: application/zip
- name: Upload Release AAB
id: upload_release_aab
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: release/app-releaseUnsigned.aab
asset_name: MerossPairer.aab
asset_content_type: application/zip