Monthly Update #14
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: Deploy to Google Play | |
on: | |
push: | |
branches: [ staging ] | |
paths: | |
- 'app/**' | |
- 'gradle/**' | |
- 'build.gradle.kts' | |
- 'gradle.properties' | |
- 'settings.gradle.kts' | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Deploy to Google Play | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: nttld/setup-ndk@v1 | |
with: | |
ndk-version: r26 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: temurin | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
!~/.gradle/caches/build-cache-* | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }} | |
restore-keys: ${{ runner.os }}-gradle- | |
- name: Cache build cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/.ccache | |
~/.gradle/caches/build-cache-* | |
key: ${{ runner.os }}-build-cache-${{ github.sha }} | |
restore-keys: ${{ runner.os }}-build-cache- | |
- name: File Permissions | |
run: chmod +x gradlew | |
- name: Accept Preview SDK License | |
run: echo -n -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > /usr/local/lib/android/sdk/licenses/android-sdk-preview-license | |
- name: Build Bundle | |
id: buildBundle | |
uses: gradle/gradle-build-action@v3 | |
with: | |
gradle-version: wrapper | |
arguments: bundleRelease | |
- name: Sign artifact | |
id: signArtifact | |
uses: r0adkll/sign-android-release@v1 | |
with: | |
releaseDirectory: app/build/outputs/bundle/release | |
alias: ${{ secrets.KEYALIAS }} | |
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | |
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEY_PASSWORD }} | |
env: | |
BUILD_TOOLS_VERSION: 34.0.0 | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Artifact | |
path: app/build/outputs/bundle/release/app-release.aab | |
- name: Create whatsNew | |
run: mkdir distribution/; echo '${{ github.event.head_commit.message }}' > distribution/whatsnew-en-US | |
- name: Create service_account.json | |
run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json | |
- name: Deploy to Production | |
uses: r0adkll/upload-google-play@v1 | |
with: | |
serviceAccountJson: service_account.json | |
packageName: de.dertyp7214.rboardimetester | |
releaseFiles: app/build/outputs/bundle/release/*.aab | |
track: production | |
whatsNewDirectory: distribution/ |