1- name : release ci
1+ name : Release
22on :
33 push :
44 tags :
@@ -20,48 +20,50 @@ jobs:
2020 echo ${GITHUB_REF#refs/*/}
2121 echo CI_BRANCH=${GITHUB_REF#refs/*/} >> $GITHUB_ENV
2222
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+
2331 - name : Calculate JNI cache hash
2432 id : cache-hash
25- run : script/cache-hash.sh
33+ run : |
34+ ./gradlew :app:calculateNativeCacheHash
2635
2736 - name : Fetch JNI cache
2837 uses : actions/cache@v3
2938 id : jni-cache
3039 with :
3140 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 }}
3342
3443 - name : Fetch submodules
3544 if : ${{ !steps.jni-cache.outputs.cache-hit }}
3645 run : |
3746 git submodule update --init --recursive
3847
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-
4748 - name : Setup Android SDK
4849 uses : android-actions/setup-android@v3
4950
5051 - name : Setup keystore
5152 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
5760
5861 - name : Build Trime
59- run : make debug
62+ run : make release
6063
6164 - name : Add JNI cache
6265 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
6567
6668 - name : Build changelog
6769 id : build_changelog
7981 - name : Create release
8082 uses : ncipollo/release-action@v1
8183 with :
82- artifacts : " app/build/outputs/apk/** /*.apk"
84+ artifacts : " app/build/outputs/apk/release /*.apk"
8385 body : |
8486 ${{ steps.build_changelog.outputs.changelog }}
8587 token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments