From 42ee66754c0edd25ce1513211556dec80e067d33 Mon Sep 17 00:00:00 2001 From: Joakim Hulthe Date: Tue, 6 Jan 2026 17:01:50 +0100 Subject: [PATCH] Add Gitea workflow that builds Android APKs --- .gitea/workflows/build-apk.yaml | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .gitea/workflows/build-apk.yaml diff --git a/.gitea/workflows/build-apk.yaml b/.gitea/workflows/build-apk.yaml new file mode 100644 index 0000000..62064bc --- /dev/null +++ b/.gitea/workflows/build-apk.yaml @@ -0,0 +1,36 @@ +# 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