1
- name : release ci
1
+ name : Release
2
2
on :
3
3
push :
4
4
tags :
@@ -20,48 +20,50 @@ jobs:
20
20
echo ${GITHUB_REF#refs/*/}
21
21
echo CI_BRANCH=${GITHUB_REF#refs/*/} >> $GITHUB_ENV
22
22
23
+ - name : Setup Java
24
+ uses : actions/setup-java@v3
25
+ with :
26
+ distribution : " temurin"
27
+ java-version : 21
28
+ # will restore cache of dependencies and wrappers
29
+ cache : ' gradle'
30
+
23
31
- name : Calculate JNI cache hash
24
32
id : cache-hash
25
- run : script/cache-hash.sh
33
+ run : |
34
+ ./gradlew :app:calculateNativeCacheHash
26
35
27
36
- name : Fetch JNI cache
28
37
uses : actions/cache@v3
29
38
id : jni-cache
30
39
with :
31
40
path : " app/prebuilt"
32
- key : ${{ runner.os }}-trime-jni-debug -${{ steps.cache-hash.outputs.hash }}
41
+ key : ${{ runner.os }}-trime-jni-release -${{ steps.cache-hash.outputs.native-cache- hash }}
33
42
34
43
- name : Fetch submodules
35
44
if : ${{ !steps.jni-cache.outputs.cache-hit }}
36
45
run : |
37
46
git submodule update --init --recursive
38
47
39
- - name : Setup Java
40
- uses : actions/setup-java@v3
41
- with :
42
- distribution : " temurin"
43
- java-version : 21
44
- # will restore cache of dependencies and wrappers
45
- cache : ' gradle'
46
-
47
48
- name : Setup Android SDK
48
49
uses : android-actions/setup-android@v3
49
50
50
51
- name : Setup keystore
51
52
run : |
52
- echo "set up keystore for release"
53
- echo "need help!!"
54
-
55
- - name : Install dependency
56
- run : ./script/dependency.sh
53
+ echo ${{ secrets.SIGNING_KEY }} | base64 --decode | cat >> signingkey.jks
54
+ cat << EOF > keystore.properties
55
+ storeFile=signingkey.jks
56
+ storePassword=${{ secrets.KEY_STORE_PASSWORD }}
57
+ keyAlias=${{ secrets.ALIAS }}
58
+ keyPassword=${{ secrets.KEY_PASSWORD }}
59
+ EOF
57
60
58
61
- name : Build Trime
59
- run : make debug
62
+ run : make release
60
63
61
64
- name : Add JNI cache
62
65
if : ${{ !steps.jni-cache.outputs.cache-hit }}
63
- # TODO: replace debug with release after we switched to "make release"
64
- run : cp -R app/build/intermediates/stripped_native_libs/debug/out/lib app/prebuilt
66
+ run : cp -R app/build/intermediates/stripped_native_libs/release/out/lib app/prebuilt
65
67
66
68
- name : Build changelog
67
69
id : build_changelog
79
81
- name : Create release
80
82
uses : ncipollo/release-action@v1
81
83
with :
82
- artifacts : " app/build/outputs/apk/** /*.apk"
84
+ artifacts : " app/build/outputs/apk/release /*.apk"
83
85
body : |
84
86
${{ steps.build_changelog.outputs.changelog }}
85
87
token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments