Merge pull request #473 from dmzz-yyhyy/benchmark #176
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ReleaseApkBuild | |
| on: | |
| push: | |
| branches: [master, refactoring] | |
| paths: | |
| - app/src/** | |
| - app/proguard-rules.pro | |
| - app/build.gradle.kts | |
| - build.gradle.kts | |
| - gradle.properties | |
| - settings.gradle | |
| jobs: | |
| BuildReleaseApk: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Setup Java 17 | |
| uses: actions/setup-java@v3.6.0 | |
| with: | |
| distribution: zulu | |
| java-version: 17 | |
| - name: Build with Gradle | |
| uses: gradle/actions/setup-gradle@v3 | |
| - name: make gradle wrapper executable | |
| if: ${{ runner.os != 'Windows' }} | |
| run: chmod +x ./gradlew | |
| - name: Retrieve Version | |
| run: | | |
| echo "::set-output name=VERSION_NAME::$(${{github.workspace}}/gradlew -q app:printVersion)" | |
| echo "::set-output name=VERSION_CODE::$(${{github.workspace}}/gradlew -q app:printVersionCode)" | |
| id: android_version | |
| - name: Build release APK | |
| run: ./gradlew assembleRelease | |
| - uses: r0adkll/sign-android-release@v1 | |
| name: Sign app APK | |
| id: sign_app | |
| with: | |
| releaseDirectory: app/build/outputs/apk/release | |
| signingKeyBase64: ${{ secrets.SIGNING_KEY }} | |
| alias: ${{ secrets.ALIAS }} | |
| keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | |
| keyPassword: ${{ secrets.KEY_PASSWORD }} | |
| env: | |
| BUILD_TOOLS_VERSION: "34.0.0" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: LightNovelReader-${{steps.android_version.outputs.VERSION_NAME}}-${{steps.android_version.outputs.VERSION_CODE}}-release | |
| path: | | |
| ${{steps.sign_app.outputs.signedReleaseFile}} | |
| app/build/outputs/mapping/release/mapping.txt |