-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (60 loc) · 2.09 KB
/
ci_beta.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build Beta
on:
push:
tags:
- "*-beta*"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-style:
name: Release Beta Version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
cache: gradle
- name: Set tag at the outputs
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Gradle Wrapper Validation
uses: gradle/actions/wrapper-validation@v3
- name: Gradle Setup
uses: gradle/actions/setup-gradle@v3
- name: Assemble debug APK
run: |
cd husky
./gradlew clean assembleHuskyBetaDebug
- name: Decode Keystore
env:
ENCODED_STRING: ${{ secrets.HUSKY_KS }}
run: |
TMP_KS_FILE_PATH="${RUNNER_TEMP}"/keystore
mkdir "${TMP_KS_FILE_PATH}"
echo $ENCODED_STRING | base64 -di > "${TMP_KS_FILE_PATH}"/husky_beta_ks.jks
- name: Sign APK
run: |
TMP_KS_FILE_PATH="${RUNNER_TEMP}"/keystore
cd husky/app/build/outputs/apk/huskyBeta/debug/
apksigner sign --ks "${TMP_KS_FILE_PATH}"/husky_beta_ks.jks \
--ks-key-alias ${{ secrets.HUSKY_BETA_KS_ALIAS }} \
--ks-pass ${{ secrets.HUSKY_BETA_KS_PW }} \
--key-pass ${{ secrets.HUSKY_BETA_KS_ALIAS_PW }} \
--in "husky_${{ steps.vars.outputs.tag }}.apk" \
--out "husky_${{ steps.vars.outputs.tag }}_signed.apk"
mkdir signed
mv "husky_${{ steps.vars.outputs.tag }}_signed.apk" \
signed/"husky_${{ steps.vars.outputs.tag }}.apk"
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: Build Artifacts
path: husky/app/build/outputs/apk/huskyBeta/debug/signed
# "husky/app/build/outputs/apk/huskyBeta/debug/husky_${{ steps.vars.outputs.tag }}.apk"