Skip to content

Commit 6774ca1

Browse files
committed
add debug keystore for ci
1 parent 5f8f1d2 commit 6774ca1

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,20 @@ jobs:
4242
steps:
4343
- uses: actions/checkout@v4
4444
- uses: actions/download-artifact@v4
45+
- name: Get latest release tag
46+
id: get_latest_release
47+
run: echo "::set-output name=tag::$(gh release list --exclude-pre-releases --limit 1 --json tagName --jq '.[0].tagName')"
4548
- name: Export APK_NAME for later use
46-
run: echo "APK_NAME=Debug.${{ github.ref_name }}.Nightly-CI_${{ github.run_number }}-$(echo ${{ github.sha }} | cut -c1-7).apk" >> $GITHUB_ENV
49+
run: echo "APK_NAME=ALN-${{ steps.get_latest_release.outputs.tag }}-${{ github.sha }}" >> $GITHUB_ENV
4750
- name: Rename .apk file
4851
run: mv "./Debug APK/debug/"*.apk "./$APK_NAME"
52+
- name: Decode keystore file
53+
run: echo "${{ secrets.DEBUG_KEYSTORE_FILE }}" | base64 --decode > debug.keystore
54+
- name: Sign APK
55+
run: |
56+
apksigner sign --ks debug.keystore --ks-key-alias androiddebugkey --ks-pass pass:android --key-pass pass:android "./$APK_NAME"
57+
- name: Verify APK
58+
run: apksigner verify "./$APK_NAME"
4959
- name: Delete release if exist then create release
5060
env:
5161
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.vscode
12
testing.py
23
.DS_Store
34
# Android Template

0 commit comments

Comments
 (0)