Files
inkopslista/.gitea/workflows/build-apk.yaml
T
hulthe 42ee66754c
APK Builder / build-apk (aarch64) (push) Successful in 1m33s
APK Builder / build-apk (x86_64) (push) Successful in 1m32s
Add Gitea workflow that builds Android APKs
2026-01-11 10:36:45 +01:00

37 lines
1.2 KiB
YAML

# Compile and bundle the gui into Android APKs
# The resulting APKs are uploaded to gitea as artifacts, attached to the workflow run.
name: APK Builder
run-name: Build Android APK
on: [push]
jobs:
build-apk:
runs-on: ubuntu-latest
container:
image: docker.nubo.sh/inkopslista-builder:2026-01-11
strategy:
matrix:
arch: [aarch64, x86_64]
steps:
# git clone
- name: Check out repository code
uses: actions/checkout@v4
# set the name of the output .apk based on commit and architecture
- run: echo "SHA_SHORT=$(echo ${{ gitea.sha }} | head -c 8)" >> $GITEA_ENV
- run: echo "OUT_NAME=inkopslista.${{ env.SHA_SHORT }}.${{ matrix.arch }}.apk" >> $GITEA_ENV
# build the apk
- run: cargo apk build --lib --release -p inkopslista --target ${{ matrix.arch }}-linux-android
- run: mv "$CARGO_TARGET_DIR/release/apk/inkopslista.apk" "$OUT_NAME"
# upload the apk to gitea
- uses: https://gitea.com/actions/gitea-upload-artifact@v4
with:
name : "${{ env.OUT_NAME }}"
path: "${{ env.OUT_NAME }}"
if-no-files-found: error
overwrite: true
retention-days: 360 # delete it after one year