-
Notifications
You must be signed in to change notification settings - Fork 35
58 lines (49 loc) · 1.68 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
on:
workflow_dispatch:
push:
branches:
- '**'
jobs:
build:
name: Build, sign and deploy APK
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: 17
distribution: oracle
cache: 'gradle'
- name: Build APK
run: bash ./gradlew assembleRelease --stacktrace --no-daemon
- name: Sign APK
id: sign_apk
uses: noriban/sign-android-release@v3
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "34.0.0"
- name: Upload signed APK
uses: actions/upload-artifact@v3
with:
name: Signed APK
path: ${{steps.sign_apk.outputs.signedReleaseFile}}
- name: Send signed APK to my Telegram channel
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
format: markdown
document: ${{steps.sign_apk.outputs.signedReleaseFile}}
disable_web_page_preview: true
message: |
*${{ github.actor }}* committed to *${{ github.repository }}*
Branch: *${{ github.ref_name }}*
Commit message: `${{ github.event.commits[0].message }}`
[Changes](https://github.com/${{ github.repository }}/commit/${{github.sha}})