name: Upload blueRelease to Google Play on: workflow_dispatch: jobs: build: name: Build runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4 with: java-version: '17' distribution: 'temurin' - name: Gradle Wrapper Validation uses: gradle/wrapper-validation-action@699bb18358f12c5b78b37bb0111d3a0e2276e0e2 # v2 - name: Copy CI gradle.properties run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties - name: Setup Gradle uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3 with: cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} - name: Build GitHub APK run: ./gradlew assembleBlueGithubRelease --stacktrace - name: Build Google AAB run: ./gradlew :app:bundleBlueGoogleRelease --stacktrace - uses: r0adkll/sign-android-release@dbeba6b98a60b0fd540c02443c7f428cdedf0e7f # v1.0.4 name: Sign GitHub APK id: sign_app_apk with: releaseDirectory: app/build/outputs/apk/blueGithub/release signingKeyBase64: ${{ secrets.SIGNING_KEY }} alias: ${{ secrets.SIGNING_KEY_ALIAS }} keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }} env: BUILD_TOOLS_VERSION: "34.0.0" - uses: r0adkll/sign-android-release@dbeba6b98a60b0fd540c02443c7f428cdedf0e7f # v1.0.4 name: Sign Google AAB id: sign_app_aab with: releaseDirectory: app/build/outputs/bundle/blueGoogleRelease signingKeyBase64: ${{ secrets.SIGNING_KEY }} alias: ${{ secrets.SIGNING_KEY_ALIAS }} keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }} env: BUILD_TOOLS_VERSION: "34.0.0" - name: Upload APK Release Asset id: upload-release-asset-apk uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4 with: name: app-release.apk path: ${{steps.sign_app_apk.outputs.signedReleaseFile}} - name: Generate whatsnew id: generate-whatsnew run: | mkdir -p googleplay/whatsnew cp $(find fastlane/metadata/android/en-US/changelogs | sort -n -k6 -t/ | tail -n 1) googleplay/whatsnew/whatsnew-en-US - name: Upload AAB to Google Play id: upload-release-asset-aab uses: r0adkll/upload-google-play@935ef9c68bb393a8e6116b1575626a7f5be3a7fb # v1.1.3 with: serviceAccountJsonPlainText: ${{ secrets.PLAY_SERVICE_ACCOUNT_KEY }} packageName: app.pachli releaseFiles: ${{steps.sign_app_aab.outputs.signedReleaseFile}} track: internal whatsNewDirectory: googleplay/whatsnew status: completed mappingFile: app/build/outputs/mapping/blueGoogleRelease/mapping.txt