Skip to content

Added test

Added test #39

Workflow file for this run

name: Deploy
on:
workflow_dispatch:
inputs:
track:
description: 'Release Track'
required: true
type: choice
default: production
options:
- production
- internal
push:
branches:
- master
paths:
- "**/src/main/**"
jobs:
build-aab:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
echo "${{ secrets.DEPLOY_SIGNING_KEY }}" | base64 --decode > keystore.jks
echo "${{ secrets.DEPLOY_SIGNING_PROPERTIES }}" | base64 --decode > keystore.properties
echo "${{ secrets.GOOGLE_SERVICES_JSON }}" | base64 --decode > app/google-services.json
echo "${{ secrets.SERVICE_ACCOUNT_JSON }}" | base64 --decode > service-account.json
echo "MM_BASIC_USER=${{ secrets.BASIC_USER }}" >> secrets.properties
echo "MM_BASIC_PASS=${{ secrets.BASIC_PASS }}" >> secrets.properties
echo "MM_CAPTCHA=${{ secrets.CAPTCHA }}" >> secrets.properties
echo "MM_TMDB=${{ secrets.TMDB }}" >> secrets.properties
- uses: lukasa1993/[email protected]
id: nextVersionCode
with:
serviceAccountJson: ./service-account.json
packageName: movie.metropolis.app
- run: |
versionNumber=${{steps.nextVersionCode.outputs.version}}
versionNumber=$(($versionNumber / 10 + 1))
sed -i "s/versionCode 1/versionCode $versionNumber/" buildSrc/src/main/groovy/application-conventions.gradle
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: bundleRelease
- uses: actions/upload-artifact@v3
with:
name: release-bundle
path: |
app/**/*.aab
app/**/mapping.txt
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: release-wear-bundle
path: |
app-wear/**/*.aab
app-wear/**/mapping.txt
if-no-files-found: error
publish-wear:
runs-on: ubuntu-latest
needs: [ build-aab ]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: release-wear-bundle
- run: |
echo "${{ secrets.SERVICE_ACCOUNT_JSON }}" | base64 --decode > service-account.json
- id: track
run: |
TARGET_TRACK=${{ github.event.inputs.track }}
echo "track=${TARGET_TRACK:-"production"}" >> "$GITHUB_OUTPUT"
- uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: service-account.json
packageName: movie.metropolis.app
releaseFiles: build/outputs/bundle/release/*.aab
track: wear:${{ steps.track.outputs.track }}
status: completed
inAppUpdatePriority: 3
mappingFile: build/outputs/mapping/release/mapping.txt
publish-mobile:
runs-on: ubuntu-latest
needs: [ build-aab ]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: release-bundle
- run: |
echo "${{ secrets.SERVICE_ACCOUNT_JSON }}" | base64 --decode > service-account.json
- id: track
run: |
TARGET_TRACK=${{ github.event.inputs.track }}
echo "track=${TARGET_TRACK:-"production"}" >> "$GITHUB_OUTPUT"
- uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: service-account.json
packageName: movie.metropolis.app
releaseFiles: build/outputs/bundle/release/*.aab
track: ${{ steps.track.outputs.track }}
status: completed
inAppUpdatePriority: 3
mappingFile: build/outputs/mapping/release/mapping.txt