forked from TGX-Android/Telegram-X
-
Notifications
You must be signed in to change notification settings - Fork 5
59 lines (57 loc) · 2.04 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
name: compile and publish client
on:
push:
branches:
- '*'
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.github/**'
- '!.github/workflows/build.yml'
pull_request:
branches:
- '*'
jobs:
build:
name: Gradle Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'
- name: Setup Android SDK Tools
uses: android-actions/setup-android@v2
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Chmod Gradle
run: chmod +x gradlew
- name: Importing secrets
run: |
echo "${{ secrets.prop }}" | base64 -d > local.properties
echo "${{ secrets.keystore }}" | base64 -d > keystore.properties
- name: Fix SDK 31.0.0
run: |
[ ! -f $ANDROID_HOME/build-tools/31.0.0/dx ] && cp $ANDROID_HOME/build-tools/30.0.3/dx $ANDROID_HOME/build-tools/31.0.0/dx
[ ! -f $ANDROID_HOME/build-tools/31.0.0/lib/dx.jar ] && cp $ANDROID_HOME/build-tools/30.0.3/lib/dx.jar $ANDROID_HOME/build-tools/31.0.0/lib/dx.jar
- name: Setup
run: |
export TERM=linux
git submodule init && git submodule update --init --recursive --depth=1
scripts/./setup.sh
- name: Build
run: |
export token=$(echo "${{ secrets.token }}" | base64 -d)
export chatid=$(echo "${{ secrets.chatid }}" | base64 -d)
export chatid_chlog=$(echo "${{ secrets.chatid_chlog }}" | base64 -d)
export isstable=$(echo "${{ secrets.isstable }}" | base64 -d)
export chatid_release=$(echo "${{ secrets.chatid_release }}" | base64 -d)
export commit="${{ github.event.head_commit.message }}"
export commit_author="${{ github.actor }}"
export commit_sha="${{ github.sha }}"
export run_num="${{ github.run_number }}"
bash build.sh