Skip to content

Commit

Permalink
Validate metadata for playstore (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
siper authored Jul 30, 2024
1 parent 6ded88c commit eae1785
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 31 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/check.yml

This file was deleted.

86 changes: 86 additions & 0 deletions .github/workflows/mr-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Check and Build

on:
pull_request:
branches: [ master ]

jobs:
lint:
name: Run lint checks
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v3

- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.3'
bundler-cache: true

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Lint
run: ./gradlew lint

build:
name: Build apk
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v3

- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.3'
bundler-cache: true

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build
run: ./gradlew app:assemble

check-metadata:
name: Check Play Store metadata
runs-on: ubuntu-latest
timeout-minutes: 20
env:
GOOGLE_SERVICE_KEY_JSON: ${{ secrets.GOOGLE_SERVICE_KEY_JSON }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.3'
bundler-cache: true

- name: Generate google-service-key.json file
run: echo ${{secrets.GOOGLE_SERVICE_KEY_JSON}} | base64 -d > /home/runner/work/Youamp/Youamp/google-service-key.json

- name: Validate metadata in Play Store with fastlane
run: bundle exec fastlane play_store_validate
13 changes: 13 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,20 @@ platform :android do
end
upload_to_play_store(
track: track,
sync_image_upload: true,
skip_upload_apk: true
)
end

desc "Lane for validate app metadata in Play Store"
lane :play_store_validate do
upload_to_play_store(
track: 'alpha',
skip_upload_changelogs: true,
sync_image_upload: true,
validate_only: true,
skip_upload_aab: true,
skip_upload_apk: true
)
end
end

0 comments on commit eae1785

Please sign in to comment.