Kmm hirechical structure migration #207
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ci-${{ github.ref }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
env: | |
TMDB_API_KEY: ${{ secrets.TMDB_API_KEY }} | |
TMDB_API_URL: ${{ secrets.TMDB_API_URL }} | |
TRAKT_CLIENT_ID: ${{ secrets.TRAKT_CLIENT_ID }} | |
TRAKT_CLIENT_SECRET: ${{ secrets.TRAKT_CLIENT_SECRET }} | |
TRAKT_REDIRECT_URI: ${{ secrets.TRAKT_REDIRECT_URI }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: 18 | |
- name: Setup Gradle | |
uses: gradle/[email protected] | |
- name: Add App Secrets | |
run: | | |
echo -e "\TMDB_API_KEY=$TMDB_API_KEY" >> ./local.properties | |
echo -e "\TMDB_API_URL=$TMDB_API_URL" >> ./local.properties | |
echo -e "\TRAKT_CLIENT_ID=$TRAKT_CLIENT_ID" >> ./local.properties | |
echo -e "\TRAKT_CLIENT_SECRET=$TRAKT_CLIENT_SECRET" >> ./local.properties | |
echo -e "\TRAKT_REDIRECT_URI=$TRAKT_REDIRECT_URI" >> ./local.properties | |
- name: Check lint | |
run: ./gradlew lint | |
- name: Check spotless | |
run: ./gradlew spotlessCheck --init-script tooling/checks/spotless.gradle.kts --no-configuration-cache | |
- name: Build with gradle | |
run: ./gradlew assemble | |
- name: Run local tests | |
run: ./gradlew testDemoDebug | |
- name: Build | |
run: ./gradlew assembleDemoDebug | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
draft: true | |
files: android/app/build/outputs/apk/demo/debug/app-demo-debug.apk | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload build outputs (APKs) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-outputs | |
path: android/app/build/outputs |