mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-10 04:37:25 +01:00
Apk signing pipeline job
Signed-off-by: Balazs Toldi <balazs@toldi.eu>
This commit is contained in:
parent
333d59ade4
commit
5181134253
@ -2,15 +2,22 @@ pipeline:
|
||||
build:
|
||||
image: alvrme/alpine-android:android-33-jdk11
|
||||
commands:
|
||||
- ./gradlew :app:assemble
|
||||
- ./gradlew :app:assembleRelease
|
||||
when:
|
||||
path: [ app/**, build.gradle ]
|
||||
sign:
|
||||
image: alvrme/alpine-android:android-33-jdk11
|
||||
commands:
|
||||
- ./scripts/apk-sign.sh LemmInfinity-signed.apk app/build/outputs/apk/release/app-release-unsigned.apk
|
||||
secrets: [ APK_KS_PASS, APK_KS, APK_KS_ALIAS ]
|
||||
when:
|
||||
event: [ tag ]
|
||||
publish:
|
||||
image: woodpeckerci/plugin-gitea-release
|
||||
settings:
|
||||
base_url: https://codeberg.org
|
||||
files:
|
||||
- app/build/outputs/apk/release/app-release-unsigned.apk
|
||||
- LemmInfinity-signed.apk
|
||||
api_key:
|
||||
from_secret: GITEA_ACCESS_TOKEN
|
||||
target: main
|
||||
|
9
scripts/apk-sign.sh
Executable file
9
scripts/apk-sign.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
[ -z "${APK_KS_PASS}" ] && { echo "Missing keystore password (KS_PASS)"; exit 1; }
|
||||
[ -z "${APK_KS}" ] && { echo "Missing keystore file (KS)"; exit 1; }
|
||||
[ -z "${APK_KS_ALIAS}" ] && { echo "Missing keystore alias (KS_ALIAS)"; exit 1; }
|
||||
|
||||
echo -n "$APK_KS" | base64 -d > /tmp/keystore.keystore
|
||||
|
||||
apksigner sign --ks /tmp/keystore.keystore --ks-pass pass:${APK_KS_PASS} --ks-key-alias ${APK_KS_ALIAS} --out $1 $2
|
Loading…
Reference in New Issue
Block a user