Skip to content

Commit 4ade9ee

Browse files
committed
fix(release): require signed APK and refresh launcher icon
1 parent ca1e76f commit 4ade9ee

8 files changed

Lines changed: 38 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
- name: Setup Gradle
6666
uses: gradle/actions/setup-gradle@v4
6767

68-
- name: Configure release signing (with safe fallback)
68+
- name: Configure release signing
6969
id: signing
7070
env:
7171
RELEASE_KEYSTORE_BASE64: ${{ secrets.RELEASE_KEYSTORE_BASE64 }}
@@ -76,32 +76,36 @@ jobs:
7676
set -euo pipefail
7777
7878
if [ -z "${RELEASE_KEYSTORE_BASE64:-}" ] || [ -z "${RELEASE_STORE_PASSWORD:-}" ] || [ -z "${RELEASE_KEY_ALIAS:-}" ] || [ -z "${RELEASE_KEY_PASSWORD:-}" ]; then
79-
echo "enabled=false" >> "$GITHUB_OUTPUT"
80-
echo "::warning::Release signing secrets are missing. Building unsigned APK."
81-
exit 0
79+
echo "::error::Release signing secrets are missing. Refusing to publish unsigned APK."
80+
exit 1
8281
fi
8382
8483
printf '%s' "$RELEASE_KEYSTORE_BASE64" | base64 --decode > release.jks
8584
8685
if ! keytool -list -keystore release.jks -storepass "$RELEASE_STORE_PASSWORD" -alias "$RELEASE_KEY_ALIAS" >/dev/null 2>&1; then
8786
rm -f release.jks
88-
echo "enabled=false" >> "$GITHUB_OUTPUT"
89-
echo "::warning::Keystore validation failed. Building unsigned APK."
90-
exit 0
87+
echo "::error::Keystore validation failed. Refusing to publish unsigned APK."
88+
exit 1
9189
fi
9290
9391
printf 'RELEASE_STORE_FILE=../release.jks\n' > local.properties
9492
printf 'RELEASE_STORE_PASSWORD=%s\n' "$RELEASE_STORE_PASSWORD" >> local.properties
9593
printf 'RELEASE_KEY_ALIAS=%s\n' "$RELEASE_KEY_ALIAS" >> local.properties
9694
printf 'RELEASE_KEY_PASSWORD=%s\n' "$RELEASE_KEY_PASSWORD" >> local.properties
97-
echo "enabled=true" >> "$GITHUB_OUTPUT"
9895
9996
- name: Build release AAR
10097
run: ./gradlew :lib:assembleRelease
10198

10299
- name: Build release APK
103100
run: ./gradlew :app:assembleRelease
104101

102+
- name: Verify APK is signed
103+
env:
104+
RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
105+
run: |
106+
apksigner verify --print-certs app/build/outputs/apk/release/phoneclaw.apk | tee /tmp/apk-signing.txt
107+
grep -q "Signer #1 certificate DN:" /tmp/apk-signing.txt
108+
105109
- name: Clean up signing material
106110
if: always()
107111
run: rm -f release.jks local.properties
-45.6 KB
Binary file not shown.
-22.9 KB
Binary file not shown.
-75.8 KB
Binary file not shown.
-159 KB
Binary file not shown.
-271 KB
Binary file not shown.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="108dp"
4+
android:height="108dp"
5+
android:viewportWidth="108"
6+
android:viewportHeight="108">
7+
<path
8+
android:fillColor="#FFFFFF"
9+
android:pathData="M18,67.5c0,-6.75 6.75,-31.5 36,-31.5s36,24.75 36,31.5c-13.5,9 -15.75,22.5 -36,22.5s-22.5,-13.5 -36,-22.5z" />
10+
<path
11+
android:fillColor="#FFFFFF"
12+
android:pathData="M13.5,38.25c-9,1.35 -1.35,-24.75 5.85,-30.6c3.6,-3.15 9,-2.7 10.35,-2.25c1.35,0.45 -3.6,7.65 -5.4,12.6c-0.9,2.25 -5.85,19.35 -10.8,20.25z" />
13+
<path
14+
android:fillColor="#FFFFFF"
15+
android:pathData="M94.5,38.25c9,1.35 1.35,-24.75 -5.85,-30.6c-3.6,-3.15 -9,-2.7 -10.35,-2.25c-1.35,0.45 3.6,7.65 5.4,12.6c0.9,2.25 5.85,19.35 10.8,20.25z" />
16+
<path
17+
android:fillColor="#FFFFFF"
18+
android:pathData="M42.75,28.35a5.4,5.4 0,1 0,10.8 0a5.4,5.4 0,1 0,-10.8 0z M56.25,28.35a5.4,5.4 0,1 0,10.8 0a5.4,5.4 0,1 0,-10.8 0z" />
19+
<path
20+
android:fillColor="#FFFFFF"
21+
android:pathData="M22.5,54L9,47.25L6.75,52.65L20.25,58.5z M20.25,67.5L6.75,69.75L6.75,75.6L20.25,73.35z M22.5,78.75L13.5,90L18,92.25L27,81z" />
22+
<path
23+
android:fillColor="#FFFFFF"
24+
android:pathData="M85.5,54L99,47.25L101.25,52.65L87.75,58.5z M87.75,67.5L101.25,69.75L101.25,75.6L87.75,73.35z M85.5,78.75L94.5,90L90,92.25L81,81z" />
25+
</vector>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<color name="ic_launcher_background">#B0D4F1</color>
3+
<color name="ic_launcher_background">#0F766E</color>
44
</resources>

0 commit comments

Comments
 (0)