Wave 3 (#3): encrypted keystore in repo, passphrase-only secret
Release APK / release (push) Successful in 14m29s

This commit is contained in:
Lukas Holzner committed 2026-10-02 16:57:56 +02:00
1 parent 19f3a5a48e
commit 7d70931c86
2 files changed
+11 -16

No files matched your search

+11 -16
View File
@@ -2,10 +2,10 @@
# Gitea release, so Obtainium can track updates. See issue #3. # Gitea release, so Obtainium can track updates. See issue #3.
# #
# Required repository secrets (Settings → Secrets → Actions): # Required repository secrets (Settings → Secrets → Actions):
# RELEASE_KEYSTORE_BASE64 — base64 of android/mindlist-release.keystore # KEYSTORE_PASSPHRASE — decrypts android/release-keystore.enc (committed)
# RELEASE_STORE_PASSWORD — keystore password # RELEASE_STORE_PASSWORD — keystore password
# RELEASE_KEY_ALIAS — key alias (mindlist) # RELEASE_KEY_ALIAS — key alias (mindlist)
# RELEASE_KEY_PASSWORD — key password # RELEASE_KEY_PASSWORD — key password
# #
# Obtainium: Add App → Gitea → paste the repo URL. If the repo is private, # Obtainium: Add App → Gitea → paste the repo URL. If the repo is private,
# enter an access token (account → Settings → Applications → token with # enter an access token (account → Settings → Applications → token with
@@ -73,23 +73,18 @@ jobs:
npx cap sync android npx cap sync android
- name: Restore release keystore - name: Restore release keystore
# The keystore lives in git AES-encrypted (android/release-keystore.enc);
# only this short passphrase travels as a secret, so there is no
# multi-KB paste to corrupt. Decryption is verified by hash + keytool.
env: env:
KS1: ${{ secrets.RELEASE_KS_1 }} ENC_PASS: ${{ secrets.KEYSTORE_PASSPHRASE }}
KS2: ${{ secrets.RELEASE_KS_2 }}
KS3: ${{ secrets.RELEASE_KS_3 }}
KS4: ${{ secrets.RELEASE_KS_4 }}
STORE_PASSWORD: ${{ secrets.RELEASE_STORE_PASSWORD }} STORE_PASSWORD: ${{ secrets.RELEASE_STORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }} KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }} KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
run: | run: |
test -n "$KS1" || { echo "::error::Missing RELEASE_KS_* secrets"; exit 1; } test -n "$ENC_PASS" || { echo "::error::Missing KEYSTORE_PASSPHRASE secret"; exit 1; }
# Per-chunk integrity first (pinpoints a bad paste), then full hash. openssl enc -d -aes-256-cbc -pbkdf2 -in android/release-keystore.enc \
# NB: printf, not echo — reference hashes are over raw chunk bytes. -out android/mindlist-release.keystore -pass pass:"$ENC_PASS"
printf '%s' "$KS1" | sha256sum | grep -q '^52725c9484af20ba' || { echo "::error::keystore chunk 1 mismatch"; exit 1; }
printf '%s' "$KS2" | sha256sum | grep -q '^9babcf38c4486686' || { echo "::error::keystore chunk 2 mismatch"; exit 1; }
printf '%s' "$KS3" | sha256sum | grep -q '^570b472c2ff9f449' || { echo "::error::keystore chunk 3 mismatch"; exit 1; }
printf '%s' "$KS4" | sha256sum | grep -q '^294b486d5531b5ae' || { echo "::error::keystore chunk 4 mismatch"; exit 1; }
printf '%s%s%s%s' "$KS1" "$KS2" "$KS3" "$KS4" | base64 -d > android/mindlist-release.keystore
printf 'storeFile=../mindlist-release.keystore\nstorePassword=%s\nkeyAlias=%s\nkeyPassword=%s\n' \ printf 'storeFile=../mindlist-release.keystore\nstorePassword=%s\nkeyAlias=%s\nkeyPassword=%s\n' \
"$STORE_PASSWORD" "$KEY_ALIAS" "$KEY_PASSWORD" > android/keystore.properties "$STORE_PASSWORD" "$KEY_ALIAS" "$KEY_PASSWORD" > android/keystore.properties
echo "sdk.dir=$ANDROID_HOME" > android/local.properties echo "sdk.dir=$ANDROID_HOME" > android/local.properties
Binary file not shown.