Repository navigation
CI: emulator screenshots of every screen with live data #3
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 APK | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| gradle-version: "8.11.1" | |
| - name: Signing key | |
| env: | |
| KEYSTORE_B64: ${{ secrets.KEYSTORE_B64 }} | |
| run: | | |
| if [ -n "$KEYSTORE_B64" ]; then echo "$KEYSTORE_B64" | base64 -d > app/release.p12; fi | |
| - name: Build | |
| env: | |
| AT_API_KEY: ${{ secrets.AT_API_KEY }} | |
| KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
| run: gradle :app:assembleRelease --no-daemon --stacktrace | |
| - name: Name the APK | |
| run: cp app/build/outputs/apk/release/app-release.apk AKL-Live.apk | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: AKL-Live | |
| path: AKL-Live.apk | |
| - name: Publish to the "latest" release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh release delete latest --yes --cleanup-tag || true | |
| gh release create latest AKL-Live.apk \ | |
| --title "AKL Live (build ${{ github.run_number }})" \ | |
| --notes "Built from ${{ github.sha }}. Download AKL-Live.apk on your phone and open it to install or update." |