Fix lint issues #265
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: Build | |
on: | |
push: | |
branches: [ master ] | |
pull_request_target: | |
types: [ labeled ] | |
branches: [ master ] | |
concurrency: | |
group: build-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
cache: gradle | |
- name: Update keys.c | |
run: echo '${{ secrets.DEV_KEYS }}' > api/src/main/jni/keys.c | |
- name: Create google-services.json | |
uses: "finnp/create-file-action@master" | |
env: | |
FILE_NAME: "app/google-services.json" | |
FILE_DATA: ${{ secrets.DEV_GOOGLE_SERVICES }} | |
- name: Create keystore file | |
uses: "finnp/create-file-action@master" | |
env: | |
FILE_NAME: "app/${{ secrets.DEV_KEYSTORE_FILENAME }}" | |
FILE_BASE64: ${{ secrets.DEV_KEYSTORE }} | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Check lint | |
run: ./gradlew lintDevRelease | |
- name: Build with Gradle | |
run: ./gradlew assembleDevRelease -PreleaseKeyAlias='${{ secrets.DEV_KEY_ALIAS }}' -PreleaseKeyPassword='${{ secrets.DEV_KEY_PASSWORD }}' -PreleaseStoreFile='${{ secrets.DEV_KEYSTORE_FILENAME }}' -PreleaseStorePassword='${{ secrets.DEV_KEYSTORE_PASSWORD }}' | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: photos-dev-release.apk | |
path: app/build/outputs/apk/dev/releaseDebuggable/app-dev-releaseDebuggable.apk |