Merge pull request #111 from dmzz-yyhyy/optimization #43
This file contains 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/** | |
- build.gradle.kts | |
- gradle.properties | |
- settings.gradle | |
jobs: | |
BuildDebugApk: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Java 17 | |
uses: actions/[email protected] | |
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@v3 | |
with: | |
name: LightNovelReader-${{steps.android_version.outputs.VERSION_NAME}}-${{steps.android_version.outputs.VERSION_CODE}}-release | |
path: ${{steps.sign_app.outputs.signedReleaseFile}} |