Skip to content

Commit 6fbe9ce

Browse files
committed
ci: verify release signatures
1 parent 02bd93f commit 6fbe9ce

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/release-internal.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,21 @@ jobs:
6868
KEY_PASSWORD: ${{ secrets.INTERNAL_KEY_PASSWORD }}
6969
run: ./gradlew assembleMainnetRelease --no-daemon --stacktrace
7070

71+
- name: Verify internal release signature
72+
run: |
73+
set -euo pipefail
74+
android_sdk_root="${ANDROID_HOME:-${ANDROID_SDK_ROOT:-}}"
75+
test -n "$android_sdk_root"
76+
apksigner_path="$(find "$android_sdk_root/build-tools" -name apksigner -type f | sort -V | tail -n 1)"
77+
test -n "$apksigner_path"
78+
79+
apk_count=0
80+
while IFS= read -r -d '' apk_path; do
81+
apk_count=$((apk_count + 1))
82+
"$apksigner_path" verify --verbose --print-certs "$apk_path"
83+
done < <(find app/build/outputs/apk/mainnet/release -name 'bitkit-mainnet-release-*.apk' -print0)
84+
test "$apk_count" -gt 0
85+
7186
- name: Collect internal artifacts
7287
id: artifacts
7388
run: |

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,28 @@ jobs:
6868
KEY_PASSWORD: ${{ secrets.BITKIT_KEY_PASSWORD }}
6969
run: ./gradlew assembleMainnetRelease bundleMainnetRelease --no-daemon --stacktrace
7070

71+
- name: Verify release signatures
72+
run: |
73+
set -euo pipefail
74+
android_sdk_root="${ANDROID_HOME:-${ANDROID_SDK_ROOT:-}}"
75+
test -n "$android_sdk_root"
76+
apksigner_path="$(find "$android_sdk_root/build-tools" -name apksigner -type f | sort -V | tail -n 1)"
77+
test -n "$apksigner_path"
78+
79+
apk_count=0
80+
while IFS= read -r -d '' apk_path; do
81+
apk_count=$((apk_count + 1))
82+
"$apksigner_path" verify --verbose --print-certs "$apk_path"
83+
done < <(find app/build/outputs/apk/mainnet/release -name 'bitkit-mainnet-release-*.apk' -print0)
84+
test "$apk_count" -gt 0
85+
86+
bundle_count=0
87+
while IFS= read -r -d '' bundle_path; do
88+
bundle_count=$((bundle_count + 1))
89+
jarsigner -verify -verbose -certs "$bundle_path"
90+
done < <(find app/build/outputs/bundle/mainnetRelease -name 'bitkit-mainnet-release-*.aab' -print0)
91+
test "$bundle_count" -gt 0
92+
7193
- name: Collect release artifacts
7294
id: artifacts
7395
run: |

0 commit comments

Comments
 (0)