-
Notifications
You must be signed in to change notification settings - Fork 60
59 lines (50 loc) · 1.96 KB
/
business.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: WAE Business CI
on:
push:
branches: [ "master" ]
jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Write key
if: github.event_name != 'pull_request'
run: |
if [ ! -z "${{ secrets.KEY_STORE }}" ]; then
echo androidStorePassword='${{ secrets.KEY_STORE_PASSWORD }}' >> gradle.properties
echo androidKeyAlias='${{ secrets.ALIAS }}' >> gradle.properties
echo androidKeyPassword='${{ secrets.KEY_PASSWORD }}' >> gradle.properties
echo androidStoreFile='key.jks' >> gradle.properties
echo ${{ secrets.KEY_STORE }} | base64 --decode > key.jks
fi
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Update package name
run: sed -i 's/com.wmods.wppenhacer/com.wmods.wppenhacer.w4b/g' app/build.gradle.kts
- name: Update app name
run: sed -i 's/Wa Enhancer/Wa Enhancer Business/g' app/src/main/res/values/strings.xml
- name: Update scope
run: sed -i 's/com.whatsapp/com.whatsapp.w4b/g' app/src/main/res/values/arrays.xml
- name: Build and test app
run: |
./gradlew assembleDebug -Pminify=true
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Wa Enhancer ${{ steps.version.outputs.builddate }}
path: app/build/outputs/apk/debug/app-debug.apk
- name: Upload to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: app/build/outputs/apk/debug/app-debug.apk
asset_name: WaEnhancer_business_debug_${{ github.sha }}.apk
tag: pre-release-business-${{ github.sha }}