All checks were successful
Android Release / build-android-release (push) Successful in 10m1s
64 lines
2.1 KiB
YAML
64 lines
2.1 KiB
YAML
name: Android Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'release/android/*'
|
|
|
|
env:
|
|
ANDROID_SDK_ROOT: ${{ gitea.workspace }}/android-sdk
|
|
ANDROID_HOME: ${{ gitea.workspace }}/android-sdk
|
|
|
|
jobs:
|
|
build-android-release:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
# Gitea's default act_runner labels map ubuntu-latest to node:16-bullseye,
|
|
# so keep the GitHub-hosted actions on their Node 16-compatible v3 line.
|
|
- name: Install system dependencies
|
|
run: |
|
|
set -eu
|
|
apt-get update
|
|
apt-get install -y ca-certificates git openjdk-17-jdk unzip wget
|
|
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install Android SDK components
|
|
run: |
|
|
set -eu
|
|
|
|
wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O /tmp/android-commandlinetools.zip
|
|
|
|
rm -rf "$ANDROID_SDK_ROOT"
|
|
mkdir -p "$ANDROID_SDK_ROOT/cmdline-tools"
|
|
|
|
unzip -q /tmp/android-commandlinetools.zip -d /tmp/android-commandlinetools
|
|
mv /tmp/android-commandlinetools/cmdline-tools "$ANDROID_SDK_ROOT/cmdline-tools/latest"
|
|
|
|
# sdkmanager exits successfully once it has consumed all input, which
|
|
# causes `yes` to receive SIGPIPE and return 141 under `pipefail`.
|
|
set +o pipefail
|
|
yes | "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" --sdk_root="$ANDROID_SDK_ROOT" --licenses
|
|
set -o pipefail
|
|
|
|
"$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" --sdk_root="$ANDROID_SDK_ROOT" \
|
|
"platform-tools" \
|
|
"build-tools;33.0.1" \
|
|
"platforms;android-33"
|
|
|
|
- name: Build Android release APKs
|
|
working-directory: android
|
|
run: ./gradlew assembleRelease
|
|
|
|
- name: Upload release artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: kordophone-android-release
|
|
path: |
|
|
android/app/build/outputs/apk/release/*.apk
|
|
android/app/build/outputs/apk/release/output-metadata.json
|
|
if-no-files-found: error
|
|
retention-days: 90
|