2021-02-18 02:32:17 +00:00
|
|
|
name: Release Build
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
tag:
|
|
|
|
description: 'Release Tag'
|
|
|
|
required: true
|
|
|
|
play:
|
|
|
|
description: 'Play: If want ignore'
|
|
|
|
required: false
|
|
|
|
upload:
|
|
|
|
description: 'Upload: If want ignore'
|
|
|
|
required: false
|
|
|
|
publish:
|
|
|
|
description: 'Publish: If want ignore'
|
|
|
|
required: false
|
|
|
|
jobs:
|
|
|
|
check:
|
|
|
|
name: Check Access
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: "Check access"
|
|
|
|
uses: "lannonbr/repo-permission-check-action@2.0.0"
|
|
|
|
with:
|
|
|
|
permission: "write"
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2021-02-25 11:55:43 +00:00
|
|
|
ffmpeg:
|
2021-03-05 05:38:05 +00:00
|
|
|
name: Native Build (FFmpeg)
|
2021-02-25 11:55:43 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-03-05 04:10:37 +00:00
|
|
|
needs: check
|
2021-02-25 11:55:43 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Fetch Status
|
|
|
|
run: git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status
|
|
|
|
- name: FFmpeg Cache
|
|
|
|
id: cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
TMessagesProj/jni/ffmpeg/build
|
|
|
|
key: ${{ hashFiles('ffmpeg_status') }}
|
|
|
|
- name: Setup Android SDK Tools
|
|
|
|
uses: android-actions/setup-android@v2
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
- name: Install NDK
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
2021-03-26 02:01:53 +00:00
|
|
|
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
2021-02-25 11:55:43 +00:00
|
|
|
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
2021-03-26 02:01:53 +00:00
|
|
|
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
2021-02-25 11:55:43 +00:00
|
|
|
- name: Native Build
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
|
|
|
./run init libs ffmpeg
|
|
|
|
boringssl:
|
2021-03-05 05:38:05 +00:00
|
|
|
name: Native Build (BoringSSL)
|
2021-02-18 02:32:17 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-03-05 04:10:37 +00:00
|
|
|
needs: check
|
2021-02-18 02:32:17 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2021-02-25 11:55:43 +00:00
|
|
|
- name: Fetch Status
|
|
|
|
run: git submodule status TMessagesProj/jni/boringssl > boringssl_status
|
|
|
|
- name: BoringSSL Cache
|
|
|
|
id: cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
TMessagesProj/jni/boringssl/build
|
|
|
|
key: ${{ hashFiles('boringssl_status') }}
|
2021-02-18 02:32:17 +00:00
|
|
|
- name: Setup Android SDK Tools
|
|
|
|
uses: android-actions/setup-android@v2
|
2021-02-25 11:55:43 +00:00
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
- name: Install NDK
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
2021-03-26 02:01:53 +00:00
|
|
|
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
2021-02-25 11:55:43 +00:00
|
|
|
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
2021-03-26 02:01:53 +00:00
|
|
|
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
2021-02-25 11:55:43 +00:00
|
|
|
- name: Native Build
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
|
|
|
./run init action boringssl
|
|
|
|
./run init libs boringssl
|
|
|
|
native:
|
2021-03-05 05:38:05 +00:00
|
|
|
name: Native Build (Telegram)
|
2021-02-25 11:55:43 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs:
|
|
|
|
- ffmpeg
|
|
|
|
- boringssl
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Fetch Status
|
|
|
|
run: |
|
|
|
|
git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status
|
|
|
|
git submodule status TMessagesProj/jni/boringssl > boringssl_status
|
2021-02-18 02:32:17 +00:00
|
|
|
- name: Native Cache
|
2021-02-25 11:55:43 +00:00
|
|
|
id: cache
|
|
|
|
uses: actions/cache@v2
|
2021-02-18 02:32:17 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
TMessagesProj/src/main/libs
|
2021-02-25 11:55:43 +00:00
|
|
|
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}
|
|
|
|
- name: Checkout Library
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
2021-02-18 02:32:17 +00:00
|
|
|
run: |
|
2021-02-25 11:55:43 +00:00
|
|
|
git submodule update --init 'TMessagesProj/jni/*'
|
|
|
|
- name: FFmpeg Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
TMessagesProj/jni/ffmpeg/build
|
|
|
|
key: ${{ hashFiles('ffmpeg_status') }}
|
|
|
|
- name: BoringSSL Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
TMessagesProj/jni/boringssl/build
|
|
|
|
key: ${{ hashFiles('boringssl_status') }}
|
|
|
|
- name: Setup Android SDK Tools
|
|
|
|
uses: android-actions/setup-android@v2
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
2021-02-18 02:32:17 +00:00
|
|
|
- name: Install NDK
|
2021-02-25 11:55:43 +00:00
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
2021-02-18 02:32:17 +00:00
|
|
|
run: |
|
2021-03-26 02:01:53 +00:00
|
|
|
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
2021-02-18 02:32:17 +00:00
|
|
|
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
2021-03-26 02:01:53 +00:00
|
|
|
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
2021-02-25 11:55:43 +00:00
|
|
|
- name: Fix BoringSSL
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
|
|
|
cd TMessagesProj/jni
|
|
|
|
./patch_boringssl.sh
|
|
|
|
- name: Native Build
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
|
|
|
./run libs native
|
|
|
|
v2ray:
|
2021-03-05 05:38:05 +00:00
|
|
|
name: Native Build (V2ray)
|
2021-02-25 11:55:43 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-03-05 04:10:37 +00:00
|
|
|
needs: check
|
2021-02-25 11:55:43 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2021-03-16 14:47:37 +00:00
|
|
|
- name: Fetch Status
|
|
|
|
run: git submodule status v2ray > v2ray_status
|
2021-02-25 11:55:43 +00:00
|
|
|
- name: V2ray Cache
|
|
|
|
id: cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
TMessagesProj/libs/libv2ray.aar
|
2021-03-16 14:47:37 +00:00
|
|
|
key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }}
|
2021-02-25 11:55:43 +00:00
|
|
|
- name: Setup Android SDK Tools
|
|
|
|
uses: android-actions/setup-android@v2
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
- name: Install NDK
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
2021-03-26 02:01:53 +00:00
|
|
|
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
2021-02-25 11:55:43 +00:00
|
|
|
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
2021-03-26 02:01:53 +00:00
|
|
|
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
2021-02-25 11:55:43 +00:00
|
|
|
- name: Install Golang
|
2021-02-18 02:32:17 +00:00
|
|
|
uses: actions/setup-go@v2
|
2021-02-25 11:55:43 +00:00
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
2021-02-18 02:32:17 +00:00
|
|
|
with:
|
2021-03-05 15:09:24 +00:00
|
|
|
go-version: 1.16
|
2021-02-18 02:32:17 +00:00
|
|
|
- name: Native Build
|
2021-02-25 11:55:43 +00:00
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
run: ./run libs v2ray
|
|
|
|
shadowsocks:
|
2021-03-05 05:38:05 +00:00
|
|
|
name: Native Build (Shadowsocks)
|
2021-02-25 11:55:43 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-03-05 04:10:37 +00:00
|
|
|
needs: check
|
2021-02-25 11:55:43 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Fetch Status
|
|
|
|
run: git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status
|
|
|
|
- name: Shadowsocks Cache
|
|
|
|
id: cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
TMessagesProj/libs/ss-rust-release.aar
|
|
|
|
key: ${{ hashFiles('shadowsocks_status') }}
|
|
|
|
- name: Setup Android SDK Tools
|
|
|
|
uses: android-actions/setup-android@v2
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
- name: Install NDK
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
2021-03-26 02:01:53 +00:00
|
|
|
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
2021-02-25 11:55:43 +00:00
|
|
|
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
2021-03-26 02:01:53 +00:00
|
|
|
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
2021-02-25 11:55:43 +00:00
|
|
|
- name: Install Rust
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
run: ./run init action shadowsocks
|
|
|
|
- name: Native Build
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
run: ./run libs shadowsocks
|
|
|
|
shadowsocksr:
|
2021-03-05 05:38:05 +00:00
|
|
|
name: Native Build (ShadowsocksR)
|
2021-02-25 11:55:43 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-03-05 04:10:37 +00:00
|
|
|
needs: check
|
2021-02-25 11:55:43 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Fetch Status
|
|
|
|
run: git submodule status 'ssr-libev/*' > shadowsocksr_status
|
|
|
|
- name: ShadowsocksR Cache
|
|
|
|
id: cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
TMessagesProj/libs/ssr-libev-release.aar
|
|
|
|
key: ${{ hashFiles('shadowsocksr_status') }}
|
|
|
|
- name: Setup Android SDK Tools
|
|
|
|
uses: android-actions/setup-android@v2
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
- name: Install NDK
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
2021-02-18 02:32:17 +00:00
|
|
|
run: |
|
2021-03-26 02:01:53 +00:00
|
|
|
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
2021-02-25 11:55:43 +00:00
|
|
|
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
2021-03-26 02:01:53 +00:00
|
|
|
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
2021-02-25 11:55:43 +00:00
|
|
|
- name: Native Build
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
run: ./run libs ssr
|
2021-02-18 02:32:17 +00:00
|
|
|
build:
|
2021-03-16 14:47:37 +00:00
|
|
|
name: Gradle Build
|
2021-02-18 02:32:17 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-02-25 11:55:43 +00:00
|
|
|
needs:
|
|
|
|
- native
|
|
|
|
- v2ray
|
|
|
|
- shadowsocks
|
|
|
|
- shadowsocksr
|
2021-02-18 02:32:17 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
flavor:
|
|
|
|
- FullRelease
|
|
|
|
- FullReleaseNoGcm
|
|
|
|
- FullAppleEmojiRelease
|
|
|
|
- FullAppleEmojiReleaseNoGcm
|
|
|
|
- MiniRelease
|
|
|
|
- MiniReleaseNoGcm
|
|
|
|
- MiniAppleEmojiRelease
|
|
|
|
- MiniAppleEmojiReleaseNoGcm
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Android SDK Tools
|
|
|
|
uses: android-actions/setup-android@v2
|
2021-02-25 11:55:43 +00:00
|
|
|
- name: Fetch Status
|
|
|
|
run: |
|
|
|
|
git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status
|
|
|
|
git submodule status TMessagesProj/jni/boringssl > boringssl_status
|
|
|
|
git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status
|
|
|
|
git submodule status 'ssr-libev/*' > shadowsocksr_status
|
2021-03-16 14:47:37 +00:00
|
|
|
git submodule status v2ray > v2ray_status
|
2021-02-18 02:32:17 +00:00
|
|
|
- name: Native Cache
|
2021-02-25 11:55:43 +00:00
|
|
|
uses: actions/cache@v2
|
2021-02-18 02:32:17 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
TMessagesProj/src/main/libs
|
2021-02-25 11:55:43 +00:00
|
|
|
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}
|
|
|
|
- name: V2ray Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
TMessagesProj/libs/libv2ray.aar
|
2021-03-16 14:47:37 +00:00
|
|
|
key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }}
|
2021-02-25 11:55:43 +00:00
|
|
|
- name: Shadowsocks Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
TMessagesProj/libs/ss-rust-release.aar
|
|
|
|
key: ${{ hashFiles('shadowsocks_status') }}
|
|
|
|
- name: ShadowsocksR Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
TMessagesProj/libs/ssr-libev-release.aar
|
|
|
|
key: ${{ hashFiles('shadowsocksr_status') }}
|
2021-02-18 02:32:17 +00:00
|
|
|
- name: Fix Gradle Memoery
|
|
|
|
run: |
|
|
|
|
sed -i -e "s/16384/6144/g" gradle.properties
|
|
|
|
echo "ndk.dir=${ANDROID_HOME}/ndk-bundle" > local.properties
|
|
|
|
- name: Gradle cache
|
2021-02-25 11:55:43 +00:00
|
|
|
uses: actions/cache@v2
|
2021-02-18 02:32:17 +00:00
|
|
|
with:
|
|
|
|
path: ~/.gradle
|
|
|
|
key: gradle-${{ hashFiles('**/*.gradle') }}
|
|
|
|
- name: Release Build
|
|
|
|
run: |
|
|
|
|
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
|
|
|
|
./gradlew TMessagesProj:assemble${{ matrix.flavor }}
|
|
|
|
|
|
|
|
APK=$(find TMessagesProj/build/outputs/apk -name '*arm64-v8a*.apk')
|
|
|
|
APK=$(dirname $APK)
|
|
|
|
echo "APK=$APK" >> $GITHUB_ENV
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.flavor }}
|
|
|
|
path: ${{ env.APK }}
|
|
|
|
publish:
|
|
|
|
name: Publish Release
|
|
|
|
if: github.event.inputs.publish != 'y'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Donwload Artifacts
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
path: artifacts
|
|
|
|
- name: Release
|
|
|
|
run: |
|
|
|
|
wget -O ghr.tar.gz https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz
|
|
|
|
tar -xvf ghr.tar.gz
|
|
|
|
mv ghr*linux_amd64/ghr .
|
|
|
|
mkdir apks
|
|
|
|
find artifacts -name "*.apk" -exec cp {} apks \;
|
|
|
|
./ghr -delete -t "${{ github.token }}" -n "${{ github.event.inputs.tag }}" "${{ github.event.inputs.tag }}" apks
|
|
|
|
upload:
|
|
|
|
name: Upload Release
|
|
|
|
if: github.event.inputs.upload != 'y'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
|
|
|
steps:
|
|
|
|
- name: Donwload Artifacts
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
path: artifacts
|
|
|
|
- name: Release
|
|
|
|
run: |
|
|
|
|
mkdir apks
|
|
|
|
find artifacts -name "*.apk" -exec cp {} apks \;
|
|
|
|
function upload() {
|
|
|
|
for apk in $@; do
|
|
|
|
echo ">> Uploading $apk"
|
|
|
|
curl https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendDocument \
|
|
|
|
-X POST \
|
|
|
|
-F chat_id="${{ secrets.TELEGRAM_CHANNEL }}" \
|
|
|
|
-F document="@$apk" \
|
|
|
|
--silent --show-error --fail >/dev/null &
|
|
|
|
done
|
|
|
|
for job in $(jobs -p); do
|
|
|
|
wait $job || exit 1
|
|
|
|
done
|
|
|
|
}
|
|
|
|
upload apks/NekoX-full-*-release.apk
|
|
|
|
upload apks/NekoX-full-*-releaseNoGcm.apk
|
|
|
|
upload apks/NekoX-mini-*-release.apk
|
|
|
|
upload apks/NekoX-mini-*-releaseNoGcm.apk
|
|
|
|
play:
|
|
|
|
name: Publish to Play Store
|
|
|
|
if: github.event.inputs.play != 'y'
|
|
|
|
runs-on: ubuntu-latest
|
2021-02-26 06:08:07 +00:00
|
|
|
needs:
|
|
|
|
- native
|
|
|
|
- v2ray
|
|
|
|
- shadowsocks
|
|
|
|
- shadowsocksr
|
2021-02-18 02:32:17 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Android SDK Tools
|
|
|
|
uses: android-actions/setup-android@v2
|
2021-02-26 06:08:07 +00:00
|
|
|
- name: Fetch Status
|
|
|
|
run: |
|
|
|
|
git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status
|
|
|
|
git submodule status TMessagesProj/jni/boringssl > boringssl_status
|
|
|
|
git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status
|
|
|
|
git submodule status 'ssr-libev/*' > shadowsocksr_status
|
2021-02-18 02:32:17 +00:00
|
|
|
- name: Native Cache
|
2021-02-25 11:55:43 +00:00
|
|
|
uses: actions/cache@v2
|
2021-02-18 02:32:17 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
TMessagesProj/src/main/libs
|
2021-02-26 06:08:07 +00:00
|
|
|
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}
|
|
|
|
- name: V2ray Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
TMessagesProj/libs/libv2ray.aar
|
2021-03-01 08:02:36 +00:00
|
|
|
key: ${{ hashFiles('bin/libs/v2ray/*') }}
|
2021-02-26 06:08:07 +00:00
|
|
|
- name: Shadowsocks Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
TMessagesProj/libs/ss-rust-release.aar
|
|
|
|
key: ${{ hashFiles('shadowsocks_status') }}
|
|
|
|
- name: ShadowsocksR Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
TMessagesProj/libs/ssr-libev-release.aar
|
|
|
|
key: ${{ hashFiles('shadowsocksr_status') }}
|
2021-03-05 04:10:37 +00:00
|
|
|
- name: Configure Gradle
|
2021-02-18 02:32:17 +00:00
|
|
|
run: |
|
|
|
|
sed -i -e "s/16384/6144/g" gradle.properties
|
2021-03-05 04:10:37 +00:00
|
|
|
echo "sdk.dir=${ANDROID_HOME}" >> local.properties
|
|
|
|
echo "ndk.dir=${ANDROID_HOME}/ndk-bundle" >> local.properties
|
2021-02-18 02:32:17 +00:00
|
|
|
- name: Gradle cache
|
2021-02-25 11:55:43 +00:00
|
|
|
uses: actions/cache@v2
|
2021-02-18 02:32:17 +00:00
|
|
|
with:
|
|
|
|
path: ~/.gradle
|
|
|
|
key: gradle-${{ hashFiles('**/*.gradle') }}
|
|
|
|
- name: Publish to Play Store
|
|
|
|
run: |
|
|
|
|
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
|
|
|
|
cat > service_account_credentials.json << EOF
|
|
|
|
${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }}"
|
|
|
|
EOF
|
|
|
|
sed -i -e 's@<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />@@g' TMessagesProj/src/main/AndroidManifest.xml
|
|
|
|
./gradlew TMessagesProj:publishFullPlayRelease
|