mirror of
https://github.com/NekoX-Dev/NekoX.git
synced 2025-01-06 00:05:32 +01:00
Bump version
This commit is contained in:
parent
535f946239
commit
cc6d2d278c
247
.github/workflows/release.yml
vendored
247
.github/workflows/release.yml
vendored
@ -25,46 +25,215 @@ jobs:
|
||||
permission: "write"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
native:
|
||||
name: Native Build
|
||||
needs: check
|
||||
|
||||
ffmpeg:
|
||||
name: Native Build ( FFmpeg )
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Android SDK Tools
|
||||
uses: android-actions/setup-android@v2
|
||||
- name: Native Cache
|
||||
uses: actions/cache@main
|
||||
- name: Fetch Status
|
||||
run: git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status
|
||||
- name: FFmpeg Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
TMessagesProj/libs
|
||||
TMessagesProj/src/main/libs
|
||||
key: ${{ hashFiles('TMessagesProj/jni/**', 'ss-rust/src/main/rust/**') }}
|
||||
- name: Check Cache
|
||||
run: |
|
||||
[ -f "TMessagesProj/libs/libv2ray.aar" ] && echo "Cache found." || echo "CONTINUE=true" >> $GITHUB_ENV
|
||||
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: env.CONTINUE
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.3.6528147" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
||||
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.3.6528147" >> local.properties
|
||||
- name: Install Go
|
||||
- name: Native Build
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
./run init libs ffmpeg
|
||||
boringssl:
|
||||
name: Native Build ( BoringSSL )
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- 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') }}
|
||||
- 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: |
|
||||
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.3.6528147" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
||||
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.3.6528147" >> local.properties
|
||||
- name: Native Build
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
./run init action boringssl
|
||||
./run init libs boringssl
|
||||
native:
|
||||
name: Native Build ( Telegram )
|
||||
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
|
||||
- name: Native Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
TMessagesProj/src/main/libs
|
||||
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}
|
||||
- name: Checkout Library
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
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'
|
||||
- name: Install NDK
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.3.6528147" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
||||
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.3.6528147" >> local.properties
|
||||
- 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:
|
||||
name: Native Build (V2ray)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: V2ray Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
TMessagesProj/libs/libv2ray.aar
|
||||
key: ${{ hashFiles('bin/libs/v2ray.sh') }}
|
||||
- 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: |
|
||||
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.3.6528147" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
||||
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.3.6528147" >> local.properties
|
||||
- name: Install Golang
|
||||
uses: actions/setup-go@v2
|
||||
if: env.CONTINUE
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
go-version: ^1.15
|
||||
- name: Native Build
|
||||
if: env.CONTINUE
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./run libs v2ray
|
||||
shadowsocks:
|
||||
name: Native Build (Shadowsocks)
|
||||
runs-on: ubuntu-latest
|
||||
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: |
|
||||
./run init action
|
||||
./run init libs
|
||||
./run libs update
|
||||
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.3.6528147" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
||||
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.3.6528147" >> local.properties
|
||||
- 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:
|
||||
name: Native Build (ShadowsocksR)
|
||||
runs-on: ubuntu-latest
|
||||
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'
|
||||
run: |
|
||||
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.3.6528147" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
||||
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.3.6528147" >> local.properties
|
||||
- name: Native Build
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./run libs ssr
|
||||
build:
|
||||
name: Release Build
|
||||
runs-on: ubuntu-latest
|
||||
needs: native
|
||||
needs:
|
||||
- native
|
||||
- v2ray
|
||||
- shadowsocks
|
||||
- shadowsocksr
|
||||
strategy:
|
||||
matrix:
|
||||
flavor:
|
||||
@ -81,19 +250,43 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Android SDK Tools
|
||||
uses: android-actions/setup-android@v2
|
||||
- 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
|
||||
- name: Native Cache
|
||||
uses: actions/cache@main
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
TMessagesProj/libs
|
||||
TMessagesProj/src/main/libs
|
||||
key: ${{ hashFiles('TMessagesProj/jni/**', 'ss-rust/src/main/rust/**') }}
|
||||
key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}
|
||||
- name: V2ray Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
TMessagesProj/libs/libv2ray.aar
|
||||
key: ${{ hashFiles('bin/libs/v2ray.sh') }}
|
||||
- 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') }}
|
||||
- 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
|
||||
uses: actions/cache@main
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.gradle
|
||||
key: gradle-${{ hashFiles('**/*.gradle') }}
|
||||
@ -171,7 +364,7 @@ jobs:
|
||||
- name: Setup Android SDK Tools
|
||||
uses: android-actions/setup-android@v2
|
||||
- name: Native Cache
|
||||
uses: actions/cache@main
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
TMessagesProj/libs
|
||||
@ -182,7 +375,7 @@ jobs:
|
||||
sed -i -e "s/16384/6144/g" gradle.properties
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk-bundle" > local.properties
|
||||
- name: Gradle cache
|
||||
uses: actions/cache@main
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.gradle
|
||||
key: gradle-${{ hashFiles('**/*.gradle') }}
|
||||
|
@ -253,7 +253,9 @@ android {
|
||||
zipAlignEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
matchingFallbacks = ['debug']
|
||||
signingConfig signingConfigs.release
|
||||
if (keystorePwd != null) {
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
|
||||
release {
|
||||
|
Loading…
Reference in New Issue
Block a user