diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 94b74225..6912ac53 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,10 +30,10 @@ jobs: if: ${{ github.event_name != 'pull_request' || github.ref_type == 'tag' }} run: | if [ -n "${{ secrets.RELEASEKEYPASSWORD }}" ]; then - echo releaseKeyAlias="${{ vars.RELEASE_KEY_ALIAS }}" >> keystore.properties - echo releaseKeyPassword="${{ secrets.RELEASEKEYPASSWORD }}" >> keystore.properties - echo releaseKeyStore="${{ vars.RELEASE_KEYSTORE }}" >> keystore.properties - echo releaseStorePassword="${{ secrets.RELEASESTOREPASSWORD }}" >> keystore.properties + echo keystore.file="${{ vars.RELEASE_KEYSTORE }}" >> keystore.properties + echo keystore.password="${{ secrets.RELEASESTOREPASSWORD }}" >> keystore.properties + echo keystore.key.alias="${{ vars.RELEASE_KEY_ALIAS }}" >> keystore.properties + echo keystore.key.password="${{ secrets.RELEASEKEYPASSWORD }}" >> keystore.properties fi - name: Setup Gradle @@ -43,7 +43,7 @@ jobs: cache-read-only: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/4.0-dev' }} - name: Build with Gradle - run: ./gradlew assemble + run: ./gradlew assembleRelease - name: Read Output Metadata id: read_output_metadata @@ -61,15 +61,6 @@ jobs: name: "release-${{ env.version_name }}(${{ env.version_code }})" path: ./app/build/outputs/apk/release - - name: Upload Debug Package - env: - version_code: ${{ fromJSON(steps.read_output_metadata.outputs.content).elements[0].versionCode }} - version_name: ${{ fromJSON(steps.read_output_metadata.outputs.content).elements[0].versionName }} - uses: actions/upload-artifact@v3 - with: - name: "debug-${{ env.version_name }}(${{ env.version_code }})" - path: ./app/build/outputs/apk/debug - - name: Upload Mapping uses: actions/upload-artifact@v4 with: @@ -107,4 +98,4 @@ jobs: uses: saurav-aggarwal/appcenter-cli-action@1.0.1 with: token: ${{ secrets.APP_CENTER_TOKEN }} - command: appcenter crashes upload-mappings -c ${{ env.version_code }} -n ${{ env.version_name }} -m ${{ github.workspace }}/app/build/outputs/mapping/release/mapping.txt -a ${{ secrets.APP_CENTER_APP }} + command: appcenter crashes upload-mappings -c ${{ env.version_code }} -n ${{ env.version_name }} -m /github/workspace/app/build/outputs/mapping/release/mapping.txt -a huanchengfly/TiebaLite diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 76a63683..94159537 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -54,12 +54,13 @@ android { compose = true } signingConfigs { - if (property.releaseKeyStore.isNotEmpty()) { + println("keystore.file: ${property.keystore.file}") + if (property.keystore.file.isNotBlank()) { val config by creating { - keyAlias = property.releaseKeyAlias - keyPassword = property.releaseKeyPassword - storeFile = file(File(rootDir, property.releaseKeyStore)) - storePassword = property.releaseStorePassword + storeFile = file(File(rootDir, property.keystore.file)) + storePassword = property.keystore.password + keyAlias = property.keystore.key.alias + keyPassword = property.keystore.key.password enableV3Signing = true enableV4Signing = true } diff --git a/settings.gradle.kts b/settings.gradle.kts index 44cdc3c6..7cb15465 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -26,7 +26,7 @@ sweetProperty { isAddDefault = true ) permanentKeyValues( - "releaseKeyStore" to "" + "keystore.file" to "" ) generateFrom(CURRENT_PROJECT, ROOT_PROJECT) }