Skip to content

Commit

Permalink
Build two versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Webpage-gh authored Jun 8, 2024
1 parent d4b07b2 commit 312393d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Binary file removed .github/workflows/.build.yml.swp
Binary file not shown.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
environment: buildapk
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -31,7 +32,7 @@ jobs:
uses: noriban/sign-android-release@v5.1
id: sign_app
with:
releaseDirectory: app/build/outputs/apk/release
releaseDirectory: release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
Expand All @@ -44,4 +45,6 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Vojazento
path: ${{ steps.sign_app.outputs.signedReleaseFile }}
path: |
${{ steps.sign_app.outputs.signedReleaseFile0 }}
${{ steps.sign_app.outputs.signedReleaseFile1 }}
6 changes: 4 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -x

APK_PATH="app/build/outputs/apk/release/app-release-unsigned.apk"
JAVA_FILE="app/src/main/java/com/sevtinge/vojazento/XposedInit.java"
Expand All @@ -7,10 +8,11 @@ KEYWORD="boolean IS_CHINA_MAINLAND_BUILD"
build_and_move_apk() {
local build_type=$1
./gradlew build
mv "$APK_PATH" "$(dirname APK_PATH)/Vojazento-$build_type.apk"
mv "$APK_PATH" "release/Vojazento-$build_type.apk"
}

chmod +x ./gradle
chmod +x ./gradlew
mkdir -p release

if grep -q "$KEYWORD = true" $JAVA_FILE; then
build_and_move_apk "China"
Expand Down

0 comments on commit 312393d

Please sign in to comment.