Repo hygiene: formatter, CI, lint config, README #4
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: ci | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: ktlint via pre-commit | |
| run: pipx run pre-commit run --all-files --show-diff-on-failure | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - uses: gradle/actions/setup-gradle@v5 | |
| # Lint first: a lint failure should not cost a full APK build. | |
| - name: Lint | |
| run: ./gradlew :app:lintDebug | |
| - name: Build debug APK | |
| run: ./gradlew :app:assembleDebug | |
| # Unsigned, but proves the R8/minify path before launch week does. | |
| - name: Build release APK | |
| run: ./gradlew :app:assembleRelease | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-debug | |
| path: app/build/outputs/apk/debug/app-debug.apk |