Add release/build tooling and README
- Real release build type: R8 shrinking + shrunk resources, with a keep rule for VeilHook specifically — LSPosed finds it by exact class name via the plaintext xposed_init asset, which R8 can't see, so obfuscating it would silently break module loading with no build error to point at why. - Signing config that reads keystore.properties if present (gitignored, generated via scripts/generate-keystore.sh), falling back to debug signing otherwise so assembleRelease always produces something installable. - scripts/release.sh builds and copies a version-stamped APK into dist/. - GitHub Actions workflow building and publishing a release on any tag matching *.*.* (bare semver, e.g. 1.2.0 — no v prefix required), optionally using repo secrets for real release signing in CI. - README covering setup, the feature table, and the DenyList gotcha. No native code in this module, so a single APK already covers every architecture — no per-ABI splitting needed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*.*.*"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: "17"
|
||||
|
||||
- name: Set up Android SDK
|
||||
uses: android-actions/setup-android@v4
|
||||
with:
|
||||
packages: "platform-tools platforms;android-35 build-tools;35.0.0"
|
||||
|
||||
# Optional — only produces a properly release-signed APK if these repo secrets are set:
|
||||
# KEYSTORE_BASE64 (base64 of a release .jks), KEYSTORE_PASSWORD, KEY_ALIAS, KEY_PASSWORD.
|
||||
# Without them, the build falls back to debug signing (still installable, just not
|
||||
# signed with a dedicated release key).
|
||||
- name: Set up release signing
|
||||
env:
|
||||
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
|
||||
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
|
||||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||
run: |
|
||||
if [ -n "$KEYSTORE_BASE64" ]; then
|
||||
echo "$KEYSTORE_BASE64" | base64 -d > release.jks
|
||||
cat > keystore.properties <<EOF
|
||||
storeFile=release.jks
|
||||
storePassword=$KEYSTORE_PASSWORD
|
||||
keyAlias=$KEY_ALIAS
|
||||
keyPassword=$KEY_PASSWORD
|
||||
EOF
|
||||
else
|
||||
echo "No KEYSTORE_BASE64 secret set — release APK will be debug-signed."
|
||||
fi
|
||||
|
||||
- name: Build release APK
|
||||
run: ./gradlew assembleRelease
|
||||
|
||||
- name: Package artifact
|
||||
run: |
|
||||
mkdir -p dist
|
||||
cp app/build/outputs/apk/release/app-release.apk "dist/veil-${GITHUB_REF_NAME}.apk"
|
||||
|
||||
- name: Publish GitHub release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: dist/*.apk
|
||||
Reference in New Issue
Block a user