mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
66 lines
2.1 KiB
YAML
66 lines
2.1 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@v2
|
|
with:
|
|
submodules: recursive
|
|
- uses: Swatinem/rust-cache@v1
|
|
with:
|
|
working-directory: jni/deltachat-core-rust
|
|
- uses: actions/setup-java@v1.4.3
|
|
with:
|
|
java-version: 11
|
|
- uses: android-actions/setup-android@v2
|
|
- uses: nttld/setup-ndk@v1
|
|
id: setup-ndk
|
|
with:
|
|
ndk-version: r23c
|
|
|
|
- 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 --no-daemon assembleGplayRelease
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
token: "${{ secrets.GITHUB_TOKEN }}"
|
|
body: "Auto-generated release"
|
|
prerelease: ${{ contains(github.event.ref, '-beta') }}
|
|
fail_on_unmatched_files: true
|
|
files: build/outputs/apk/gplay/release/*.apk
|