Automate Android signed releases (APK/AAB) + GitHub Release notes (#147) #6
This file contains hidden or 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 and Test | |
| on: | |
| pull_request: | |
| push: | |
| branches: [ "main" ] | |
| permissions: | |
| contents: read | |
| env: | |
| MAIN_MODULE: app | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Make Gradle executable | |
| run: chmod +x ./gradlew | |
| - name: Create local.properties | |
| run: | | |
| echo "MAPS_API_KEY=${{ secrets.MAPS_API_KEY }}" > local.properties | |
| - name: Ktlint Check | |
| run: ./gradlew ktlintCheck | |
| - name: Build Debug | |
| run: ./gradlew :${{ env.MAIN_MODULE }}:assembleDebug | |
| - name: Unit Tests | |
| run: ./gradlew testDebugUnitTest | |
| - name: Cleanup | |
| if: always() | |
| run: rm -f local.properties |