Skip to content

Update business.yml

Update business.yml #3

Workflow file for this run

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/applicationId = "com.wmods.wppenhacer"/applicationId = "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 }}