Skip to content

Screenshots: free disk after building a branch so the emulator fits #10

Screenshots: free disk after building a branch so the emulator fits

Screenshots: free disk after building a branch so the emulator fits #10

Workflow file for this run

name: Build APK
# Every branch gets a build (download it from the run's artifacts); only
# main publishes to the "latest" release.
on:
push:
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 }}
LINZ_API_KEY: ${{ secrets.LINZ_API_KEY }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
run: gradle :app:assembleRelease --no-daemon --stacktrace
- name: Fleet survey
# which buses are on the road, and any the fleet table doesn't know yet
continue-on-error: true
env:
AT_API_KEY: ${{ secrets.AT_API_KEY }}
run: python3 tools/fleet_survey.py
- 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
if: github.ref == 'refs/heads/main'
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."