forked from Dr4iv3rNope/NotSoAndroidAyuGram
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (89 loc) · 3.17 KB
/
release.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
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
100
101
102
103
104
105
name: Build release APK
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-20.04
env:
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
CCACHE_NOHASHDIR: "true"
CCACHE_MAXSIZE: "10G"
CCACHE_HARDLINK: "true"
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: DamianReeves/write-file-action@master
with:
path: ./API_KEYS
contents: |
APP_ID = 6
APP_HASH = "eb06d4abfb49dc3eeb1aeb98ae0f581e"
MAPS_V2_API = 0
SIGNING_KEY_PASSWORD = ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_KEY_ALIAS = ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_STORE_PASSWORD = ${{ secrets.SIGNING_KEY_PASSWORD }}
write-mode: overwrite
- name: Write google-services.json
uses: timheuer/[email protected]
with:
fileName: google-services.json
fileDir: ./TMessagesProj
encodedString: ${{ secrets.GOOGLE_SERVICES_JSON_FILE_IN_BASE64 }}
- name: Write signing keystore file
uses: timheuer/[email protected]
with:
fileName: extera.jks
fileDir: ./TMessagesProj/config
encodedString: ${{ secrets.SIGNING_KEYSTORE_FILE_IN_BASE64 }}
- name: Update packages
run: sudo apt-get update
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Cache Gradle Build
uses: actions/cache@v3
with:
path: |
~/.gradle/caches/build-cache-*
~/.gradle/buildOutputCleanup/cache.properties
key: gradle-builds-${{ github.sha }}
restore-keys: |
gradle-builds
- name: Set up ccache
uses: hendrikmuhs/[email protected]
with:
key: ccache
restore-keys: ccache
- name: Setup Android SDK Tools
uses: android-actions/setup-android@v2
- name: Prepare Environment
run: |
echo "Removing large packages"
sudo apt-get update
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y '^mongodb-.*'
sudo apt-get remove -y '^mysql-.*'
sudo apt-get remove -y azure-cli firefox mono-devel libgl1-mesa-dri
sudo apt-get autoremove -y
sudo apt-get clean
echo "Removing large directories"
sudo rm -rf /usr/share/dotnet/
sudo rm -rf /usr/local/graalvm/
sudo rm -rf /usr/local/.ghcup/
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /usr/local/lib/node_modules
df -h
sudo apt-get install bison gcc make curl ninja-build ccache -y
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew assembleAfatRelease
- name: Upload
uses: actions/upload-artifact@v3
with:
name: Release APK
path: TMessagesProj/build/outputs/apk/afat/release/*.apk