Fix import & backup #73 #33
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: Android CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| SIGNING_KEY_STORE_BASE64: ${{ secrets.SIGNING_KEY_STORE_BASE64 }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: "17" | |
| distribution: "temurin" | |
| cache: "gradle" | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Check code formatting | |
| run: ./gradlew spotlessCheck | |
| - name: Decode Keystore | |
| if: ${{ env.SIGNING_KEY_STORE_BASE64 != '' }} | |
| run: | | |
| echo $SIGNING_KEY_STORE_BASE64 | base64 -d > app/upload.jks | |
| - name: Build with Gradle | |
| env: | |
| SIGNING_KEY_STORE_PATH: upload.jks | |
| SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} | |
| SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | |
| SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
| run: ./gradlew build | |
| - name: Run unit tests | |
| run: ./gradlew test | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-apks | |
| path: app/build/outputs/apk/**/*.apk |