Update build.gradle.kts #12
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: Generate Debug | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
generation: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Create local.properties | |
run: echo ./local.properties | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Set up Gradle cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }} | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Execute validations | |
run: ./gradlew executeValidations | |
env: | |
SHARED_PREFERENCES_NAME: ${{ secrets.SHARED_PREFERENCES_NAME }} | |
BASE_URL: ${{ secrets.BASE_URL }} | |
BASE_URL_GQL: ${{ secrets.BASE_URL_GQL }} | |
CLIENT_ID: ${{ secrets.CLIENT_ID }} | |
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | |
DEBUG_KEY_PASSWORD: ${{ secrets.DEBUG_KEY_PASSWORD }} | |
TESTERS_GROUP: ${{ secrets.TESTERS_GROUP }} | |
- name: Build App | |
run: ./gradlew assembleDebug appDistributionUploadDebug | |
env: | |
SHARED_PREFERENCES_NAME: ${{ secrets.SHARED_PREFERENCES_NAME }} | |
BASE_URL: ${{ secrets.BASE_URL }} | |
BASE_URL_GQL: ${{ secrets.BASE_URL_GQL }} | |
CLIENT_ID: ${{ secrets.CLIENT_ID }} | |
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | |
DEBUG_KEY_PASSWORD: ${{ secrets.DEBUG_KEY_PASSWORD }} | |
TESTERS_GROUP: ${{ secrets.TESTERS_GROUP }} | |
- name: Upload APK artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: app-debug | |
path: app/build/outputs/apk/debug/app-debug.apk |