mirror of
https://github.com/okhsunrog/vpnhide.git
synced 2026-04-28 06:31:27 +00:00
feat: add release signing for lsposed and test-app APKs
- Add signingConfigs to both build.gradle.kts files, reading keystore credentials from keystore.properties (gitignored, local absolute path) - Both debug and release builds use the same signing key for consistent signatures between local and CI builds - CI decodes keystore from ANDROID_KEYSTORE_BASE64 secret, builds assembleRelease instead of assembleDebug - Add keystore-related files to .gitignore for test-app
This commit is contained in:
parent
2d5da10bb3
commit
540d7cbfcc
4 changed files with 78 additions and 5 deletions
36
.github/workflows/ci.yml
vendored
36
.github/workflows/ci.yml
vendored
|
|
@ -143,10 +143,24 @@ jobs:
|
|||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
- name: Set up keystore
|
||||
env:
|
||||
KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
||||
KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
|
||||
KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||
run: |
|
||||
KEYSTORE_PATH="${{ github.workspace }}/lsposed/release.jks"
|
||||
echo "$KEYSTORE_BASE64" | base64 --decode > "$KEYSTORE_PATH"
|
||||
cat > lsposed/keystore.properties <<EOF
|
||||
password=$KEYSTORE_PASSWORD
|
||||
keyAlias=$KEY_ALIAS
|
||||
storeFile=$KEYSTORE_PATH
|
||||
EOF
|
||||
|
||||
- name: Build APK
|
||||
run: |
|
||||
cd lsposed && ./gradlew --no-daemon assembleDebug
|
||||
cp app/build/outputs/apk/debug/app-debug.apk "$GITHUB_WORKSPACE/vpnhide-lsposed.apk"
|
||||
cd lsposed && ./gradlew --no-daemon assembleRelease
|
||||
cp app/build/outputs/apk/release/app-release.apk "$GITHUB_WORKSPACE/vpnhide-lsposed.apk"
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
|
|
@ -182,12 +196,26 @@ jobs:
|
|||
with:
|
||||
ndk-version: r28b
|
||||
|
||||
- name: Set up keystore
|
||||
env:
|
||||
KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
||||
KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
|
||||
KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||
run: |
|
||||
KEYSTORE_PATH="${{ github.workspace }}/test-app/release.jks"
|
||||
echo "$KEYSTORE_BASE64" | base64 --decode > "$KEYSTORE_PATH"
|
||||
cat > test-app/keystore.properties <<EOF
|
||||
password=$KEYSTORE_PASSWORD
|
||||
keyAlias=$KEY_ALIAS
|
||||
storeFile=$KEYSTORE_PATH
|
||||
EOF
|
||||
|
||||
- name: Build APK
|
||||
run: |
|
||||
. "$HOME/.cargo/env"
|
||||
export ANDROID_NDK_HOME=${{ steps.ndk.outputs.ndk-path }}
|
||||
cd test-app && ./gradlew --no-daemon assembleDebug
|
||||
cp app/build/outputs/apk/debug/app-debug.apk "$GITHUB_WORKSPACE/vpnhide-test.apk"
|
||||
cd test-app && ./gradlew --no-daemon assembleRelease
|
||||
cp app/build/outputs/apk/release/app-release.apk "$GITHUB_WORKSPACE/vpnhide-test.apk"
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue