ci: use a Trafero-specific persistent CI keystore path
dev / Build debug APK (push) Successful in 15s
release / Build & attach release APK (push) Successful in 25s

The runner cache already held a release.jks minted by another project with a different store password, so packageRelease failed with "keystore password was incorrect". Mint and reuse trafero-release.jks instead.
This commit is contained in:
nick committed 2026-09-21 18:02:14 +12:00
1 parent ef12660b6a
commit b8ac68b363
2 files changed
+16 -12

No files matched your search

+11 -9
View File
@@ -82,25 +82,27 @@ jobs:
git checkout "$RELEASE_TAG"
# Persistent signing keystore: minted ONCE in the runner's
# cache dir (which survives across runs, same place the JDK
# and SDK live) and copied into the checkout. Every release
# is therefore signed with the SAME key, so users can
# upgrade in place instead of hitting a signature conflict.
# A runner-host rebuild would mint a fresh key — the only
# scenario that breaks one upgrade.
# and SDK live) and copied into the checkout. Trafero uses its
# OWN file (trafero-release.jks) - the shared release.jks there
# was minted by another project with a different password.
# Every release is therefore signed with the SAME key, so
# users can upgrade in place instead of hitting a signature
# conflict. A runner-host rebuild would mint a fresh key - the
# only scenario that breaks one upgrade.
mkdir -p keystore
if [ ! -f /var/lib/gitea-runner/work/release.jks ]; then
if [ ! -f /var/lib/gitea-runner/work/trafero-release.jks ]; then
echo "Minting new persistent CI keystore"
keytool -genkey -noprompt -v \
-keystore /var/lib/gitea-runner/work/release.jks \
-keystore /var/lib/gitea-runner/work/trafero-release.jks \
-keyalg RSA -keysize 2048 -validity 10000 \
-alias trafero \
-storepass trafero_dev_keystore \
-keypass trafero_dev_keystore \
-dname "CN=Trafero Dev, OU=Local, O=Trafero, L=Local, ST=Local, C=NZ"
-dname "CN=Trafero CI, OU=Local, O=Trafero, L=Local, ST=Local, C=NZ"
else
echo "Reusing persistent CI keystore from runner cache"
fi
cp /var/lib/gitea-runner/work/release.jks keystore/release.jks
cp /var/lib/gitea-runner/work/trafero-release.jks keystore/release.jks
export JAVA_HOME=/var/lib/gitea-runner/work/jdk
export ANDROID_HOME=/var/lib/gitea-runner/work/android-sdk
export PATH=$JAVA_HOME/bin:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$PATH