2023-09-15 22:15:50 +02:00
|
|
|
name: Upload blueRelease to Google Play
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-09-27 12:13:11 +02:00
|
|
|
uses: actions/checkout@v4
|
2023-09-15 22:15:50 +02:00
|
|
|
|
|
|
|
- uses: actions/setup-java@v3
|
|
|
|
with:
|
|
|
|
java-version: '17'
|
|
|
|
distribution: 'temurin'
|
|
|
|
|
|
|
|
- name: Gradle Wrapper Validation
|
|
|
|
uses: gradle/wrapper-validation-action@v1
|
|
|
|
|
|
|
|
- name: Copy CI gradle.properties
|
|
|
|
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
|
|
|
|
|
|
|
- name: Gradle Build Action
|
|
|
|
uses: gradle/gradle-build-action@v2
|
|
|
|
with:
|
2023-09-19 16:40:07 +02:00
|
|
|
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
|
2023-09-15 22:15:50 +02:00
|
|
|
|
|
|
|
- name: Build APK
|
|
|
|
run: ./gradlew assembleBlueRelease --stacktrace
|
|
|
|
|
|
|
|
- name: Build AAB
|
|
|
|
run: ./gradlew :app:bundleBlueRelease --stacktrace
|
|
|
|
|
|
|
|
- uses: r0adkll/sign-android-release@v1.0.4
|
|
|
|
name: Sign app APK
|
|
|
|
id: sign_app_apk
|
|
|
|
with:
|
|
|
|
releaseDirectory: app/build/outputs/apk/blue/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@v1.0.4
|
|
|
|
name: Sign app AAB
|
|
|
|
id: sign_app_aab
|
|
|
|
with:
|
|
|
|
releaseDirectory: app/build/outputs/bundle/blueRelease
|
|
|
|
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@v3
|
|
|
|
with:
|
|
|
|
name: app-release.apk
|
|
|
|
path: ${{steps.sign_app_apk.outputs.signedReleaseFile}}
|
2023-09-19 12:05:06 +02:00
|
|
|
|
|
|
|
- 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
|
2023-09-27 15:18:12 +02:00
|
|
|
uses: r0adkll/upload-google-play@v1.1.2
|
2023-09-19 12:05:06 +02:00
|
|
|
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/blueRelease/mapping.txt
|