mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
70 lines
2.8 KiB
YAML
70 lines
2.8 KiB
YAML
name: Upload Release APK
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*.*.*'
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
match: ${{ steps.check-tag.outputs.match }}
|
|
steps:
|
|
- id: check-tag
|
|
run: |
|
|
if [[ "${{ github.event.ref }}" =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
|
|
echo ::set-output name=match::true
|
|
fi
|
|
|
|
build:
|
|
needs: check
|
|
if: needs.check.outputs.match == 'true'
|
|
name: Upload Release APK
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
working-directory: jni/deltachat-core-rust
|
|
- uses: actions/setup-java@v3
|
|
with:
|
|
java-version: 17
|
|
distribution: 'temurin'
|
|
- uses: android-actions/setup-android@v3
|
|
- uses: nttld/setup-ndk@v1
|
|
id: setup-ndk
|
|
with:
|
|
ndk-version: r27
|
|
|
|
- name: Compile core
|
|
env:
|
|
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
|
|
run: |
|
|
export PATH="${PATH}:${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin/:${ANDROID_NDK_ROOT}"
|
|
./scripts/install-toolchains.sh && ./scripts/ndk-make.sh
|
|
|
|
- name: Build APK
|
|
run: |
|
|
mkdir -p ~/.gradle
|
|
echo -n ${{ secrets.SIGNING_KEY }} | base64 -d >> ~/app.keystore
|
|
echo "DC_RELEASE_STORE_FILE=$HOME/app.keystore" >> ~/.gradle/gradle.properties
|
|
echo "DC_RELEASE_STORE_PASSWORD=${{ secrets.KEY_STORE_PASSWORD }}" >> ~/.gradle/gradle.properties
|
|
echo "DC_RELEASE_KEY_ALIAS=${{ secrets.ALIAS }}" >> ~/.gradle/gradle.properties
|
|
echo "DC_RELEASE_KEY_PASSWORD=${{ secrets.KEY_PASSWORD }}" >> ~/.gradle/gradle.properties
|
|
./gradlew assembleFossRelease
|
|
rm build/outputs/apk/foss/release/*universal*
|
|
./gradlew assembleGplayRelease
|
|
mv build/outputs/apk/gplay/release/*universal* build/outputs/apk/foss/release/ArcaneChat-gplay.apk
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
token: "${{ secrets.GITHUB_TOKEN }}"
|
|
body: '[<img src="store/get-it-on-fdroid.png" alt="Get it on F-Droid" height="48">](https://f-droid.org/packages/chat.delta.lite) [<img src="store/get-it-on-IzzyOnDroid.png" alt="Get it on IzzyOnDroid" height="48">](https://apt.izzysoft.de/fdroid/index/apk/chat.delta.lite) [<img src="store/get-it-on-apklis.png" alt="Disponible en Apklis" height="48">](https://www.apklis.cu/application/chat.delta.lite) [<img src="store/get-it-on-github.png" alt="Get it on GitHub" height="48">](https://github.com/ArcaneChat/android/releases/latest/download/ArcaneChat-gplay.apk)'
|
|
prerelease: ${{ contains(github.event.ref, '-beta') }}
|
|
fail_on_unmatched_files: true
|
|
files: build/outputs/apk/foss/release/*.apk
|