5aa576b596
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7 to 8. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v7...v8) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
104 lines
3.2 KiB
YAML
104 lines
3.2 KiB
YAML
name: publish-nyms5-android-apk
|
|
# unsigned APKs only, supported archs:
|
|
# - arm64-v8a (arm64)
|
|
# - x86_64
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- nyms5-android-v*
|
|
|
|
jobs:
|
|
build:
|
|
name: Build APK
|
|
runs-on: custom-ubuntu-22.04
|
|
env:
|
|
ANDROID_HOME: ${{ github.workspace }}/android-sdk
|
|
NDK_VERSION: 25.2.9519653
|
|
NDK_HOME: ${{ github.workspace }}/android-sdk/ndk/25.2.9519653
|
|
SDK_PLATFORM_VERSION: android-33
|
|
SDK_BUILDTOOLS_VERSION: 33.0.2
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Install Java
|
|
uses: actions/setup-java@v5
|
|
with:
|
|
distribution: "temurin"
|
|
java-version: "17"
|
|
|
|
- name: Install Android SDK manager
|
|
# https://developer.android.com/studio/command-line/sdkmanager
|
|
run: |
|
|
curl -sS https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip -o cmdline-tools.zip
|
|
unzip cmdline-tools.zip
|
|
mkdir -p $ANDROID_HOME/cmdline-tools/latest
|
|
mv cmdline-tools/* $ANDROID_HOME/cmdline-tools/latest
|
|
rm -rf cmdline-tools
|
|
|
|
- name: Install Android S/NDK
|
|
run: |
|
|
echo y | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses
|
|
echo y | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager \
|
|
"platforms;$SDK_PLATFORM_VERSION" \
|
|
"platform-tools" \
|
|
"ndk;$NDK_VERSION" \
|
|
"build-tools;$SDK_BUILDTOOLS_VERSION"
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@1.100.0
|
|
|
|
- name: Install rust android targets
|
|
run: |
|
|
rustup target add aarch64-linux-android \
|
|
x86_64-linux-android
|
|
|
|
- name: Build APKs (unsigned)
|
|
working-directory: nym-connect/native/android
|
|
env:
|
|
ANDROID_SDK_ROOT: ${{ env.ANDROID_HOME }}
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.NYMS5_ANDROID_SENTRY_AUTH_TOKEN }}
|
|
# build for arm64 and x86_64
|
|
run: |
|
|
echo "auth.token=$SENTRY_AUTH_TOKEN" | tee -a sentry.properties
|
|
./gradlew :app:assembleArch64Debug
|
|
./gradlew :app:assembleArch64Release
|
|
|
|
- name: Prepare APKs
|
|
run: |
|
|
mkdir apk
|
|
mv nym-connect/native/android/app/build/outputs/apk/arch64/debug/app-arch64-debug.apk \
|
|
apk/nyms5-arch64-debug.apk
|
|
mv nym-connect/native/android/app/build/outputs/apk/arch64/release/app-arch64-release-unsigned.apk \
|
|
apk/nyms5-arch64-release.apk
|
|
|
|
- name: Upload APKs
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: nyms5-apk-arch64
|
|
path: |
|
|
apk/nyms5-arch64-debug.apk
|
|
apk/nyms5-arch64-release.apk
|
|
|
|
gh-release:
|
|
name: Publish APK (GH release)
|
|
needs: build
|
|
runs-on: custom-linux
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
- name: Download binary artifact
|
|
uses: actions/download-artifact@v8
|
|
with:
|
|
name: nyms5-apk-arch64
|
|
path: apk
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: |
|
|
apk/nyms5-arch64-debug.apk
|
|
apk/nyms5-arch64-release.apk
|