From abb2431cfcb65135d40a1c8fa66a5e1e0e2cd906 Mon Sep 17 00:00:00 2001 From: WhiredPlanck Date: Fri, 12 Jan 2024 23:00:27 +0800 Subject: [PATCH] ci: complete release ci configuration --- .github/workflows/release-ci.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release-ci.yml b/.github/workflows/release-ci.yml index 2de167d064..a50821e1c7 100644 --- a/.github/workflows/release-ci.yml +++ b/.github/workflows/release-ci.yml @@ -1,4 +1,4 @@ -name: release ci +name: Release on: push: tags: @@ -29,7 +29,7 @@ jobs: id: jni-cache with: path: "app/prebuilt" - key: ${{ runner.os }}-trime-jni-debug-${{ steps.cache-hash.outputs.hash }} + key: ${{ runner.os }}-trime-jni-release-${{ steps.cache-hash.outputs.hash }} - name: Fetch submodules if: ${{ !steps.jni-cache.outputs.cache-hit }} @@ -49,19 +49,20 @@ jobs: - name: Setup keystore run: | - echo "set up keystore for release" - echo "need help!!" - - - name: Install dependency - run: ./script/dependency.sh + echo ${{ secrets.SIGNING_KEY }} | base64 --decode | cat >> signingkey.jks + cat << EOF > keystore.properties + storeFile=signingkey.jks + storePassword=${{ secrets.KEY_STORE_PASSWORD }} + keyAlias=${{ secrets.ALIAS }} + keyPassword=${{ secrets.KEY_PASSWORD }} + EOF - name: Build Trime - run: make debug + run: make release - name: Add JNI cache if: ${{ !steps.jni-cache.outputs.cache-hit }} - # TODO: replace debug with release after we switched to "make release" - run: cp -R app/build/intermediates/stripped_native_libs/debug/out/lib app/prebuilt + run: cp -R app/build/intermediates/stripped_native_libs/release/out/lib app/prebuilt - name: Build changelog id: build_changelog @@ -79,7 +80,7 @@ jobs: - name: Create release uses: ncipollo/release-action@v1 with: - artifacts: "app/build/outputs/apk/**/*.apk" + artifacts: "app/build/outputs/apk/release/*.apk" body: | ${{ steps.build_changelog.outputs.changelog }} token: ${{ secrets.GITHUB_TOKEN }}