mirror of
https://github.com/hulthe/inkopslista.git
synced 2026-08-03 23:11:28 +02:00
37 lines
1.2 KiB
YAML
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
|