ci: add GitHub Actions APK build with fixed test signing
Adds a workflow that builds and uploads a release APK on every push to main/this branch. Signing uses a static test keystore committed to the repo (app/ci-release.keystore.jks) instead of the default auto-generated debug key, so the signature stays identical across builds/runners and users can update the app without a reinstall. This keystore is for CI/testing only, not Google Play distribution.
This commit is contained in:
3 files changed
+62
No files matched your search
@@ -0,0 +1,50 @@
|
||||
name: Build APK
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- claude/main-bugs-review-nd8dax
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
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@v3
|
||||
|
||||
- name: Install required SDK packages
|
||||
run: sdkmanager "platforms;android-36" "build-tools;36.0.0"
|
||||
|
||||
- name: Cache Gradle
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', 'gradle/wrapper/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
gradle-${{ runner.os }}-
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Build release APK
|
||||
run: ./gradlew assembleRelease --stacktrace
|
||||
|
||||
- name: Upload APK artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: TurnProxy-apk
|
||||
path: app/build/outputs/apk/release/*.apk
|
||||
if-no-files-found: error
|
||||
@@ -23,6 +23,18 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
// Фиксированный тестовый keystore (не для Google Play): используется во всех
|
||||
// сборках, включая CI, чтобы подпись APK не менялась от сборки к сборке —
|
||||
// иначе обновление приложения поверх предыдущей версии ломается.
|
||||
signingConfigs {
|
||||
getByName("debug") {
|
||||
storeFile = file("ci-release.keystore.jks")
|
||||
storePassword = "vkturnproxy-ci"
|
||||
keyAlias = "ci-release"
|
||||
keyPassword = "vkturnproxy-ci"
|
||||
}
|
||||
}
|
||||
|
||||
// Красивое именование APK файлов
|
||||
applicationVariants.all {
|
||||
val variantName = name
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user