Skip to content

Commit 8fb7e28

Browse files
ci: fix local.properties and keystore path, and dynamically locate apksigner in release workflow.
1 parent b99a63f commit 8fb7e28

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/release.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ jobs:
1717
- name: Checkout code
1818
uses: actions/checkout@v4
1919

20+
- name: Set up JDK 17
21+
uses: actions/setup-java@v4
22+
with:
23+
distribution: "temurin"
24+
java-version: "17"
25+
2026
- name: Set up Flutter
2127
uses: subosito/flutter-action@v2
2228
with:
@@ -30,12 +36,14 @@ jobs:
3036
- name: Install CMake 3.18.1
3137
run: |
3238
yes | sdkmanager "cmake;3.18.1"
33-
echo "cmake.dir=$ANDROID_HOME/cmake/3.18.1" >> android/local.properties
39+
cat <<EOF > android/local.properties
40+
sdk.dir=$ANDROID_HOME
41+
cmake.dir=$ANDROID_HOME/cmake/3.18.1
42+
EOF
3443
3544
- name: Install dependencies
3645
run: flutter pub get
3746

38-
# 🔐 ANDROID SIGNING (KEYSTORE)
3947
- name: Decode Android keystore
4048
run: |
4149
mkdir -p android/app/keystore
@@ -61,9 +69,12 @@ jobs:
6169

6270
- name: Verify APK signing
6371
run: |
72+
BUILD_TOOLS_VERSION=$(ls $ANDROID_HOME/build-tools | sort -V | tail -n 1)
73+
APKSIGNER_PATH="$ANDROID_HOME/build-tools/$BUILD_TOOLS_VERSION/apksigner"
74+
echo "Using apksigner at: $APKSIGNER_PATH"
6475
for apk in build/app/outputs/flutter-apk/*.apk; do
6576
echo "Verifying $apk"
66-
apksigner verify --verbose "$apk"
77+
"$APKSIGNER_PATH" verify --verbose "$apk"
6778
done
6879
6980
- name: Upload APK Artifacts

0 commit comments

Comments
 (0)