| 5 |
| tag: |
| 6 | description: 'Release Tag' |
| 7 | required: true |
| 8 | play: |
| 9 | description: 'Play: If want ignore' |
| 10 | required: false |
| 11 | upload: |
| 12 | description: 'Upload: If want ignore' |
| 13 | required: false |
| 14 | publish: |
| 15 | description: 'Publish: If want ignore' |
| 16 | required: false |
| 17 | jobs: |
| 18 | check: |
| 19 | name: Check Access |
| 20 | runs-on: ubuntu-latest |
| 21 | steps: |
| 22 | - name: "Check access" |
| 23 | uses: "lannonbr/repo-permission-check-action@2.0.0" |
| 24 | with: |
| 25 | permission: "write" |
| 26 | env: |
| 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 28 | ffmpeg: |
| 29 | name: Native Build (FFmpeg) |
| 30 | runs-on: ubuntu-latest |
| 31 | needs: check |
| 32 | steps: |
| 33 | - name: Checkout |
| 34 | uses: actions/checkout@v2 |
| 35 | - name: Fetch Status |
| 36 | run: git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status |
| 37 | - name: FFmpeg Cache |
| 38 | id: cache |
| 39 | uses: actions/cache@v2 |
| 40 | with: |
| 41 | path: | |
| 42 | TMessagesProj/jni/ffmpeg/build |
| 43 | TMessagesProj/jni/libvpx/build |
| 44 | key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} |
| 45 | - name: Setup Android SDK Tools |
| 46 | uses: android-actions/setup-android@v2 |
| 47 | if: steps.cache.outputs.cache-hit != 'true' |
| 48 | - name: Install NDK |
| 49 | if: steps.cache.outputs.cache-hit != 'true' |
| 50 | run: | |
| 51 | echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null |
| 52 | echo "sdk.dir=${ANDROID_HOME}" > local.properties |
| 53 | echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties |
| 54 | - name: Native Build |
| 55 | if: steps.cache.outputs.cache-hit != 'true' |
| 56 | run: | |
| 57 | sudo apt-get install yasm -y |
| 58 | ./run init libs libvpx |
| 59 | ./run init libs ffmpeg |
| 60 | boringssl: |
| 61 | name: Native Build (BoringSSL) |
| 62 | runs-on: ubuntu-latest |
| 63 | needs: check |
| 64 | steps: |
| 65 | - name: Checkout |
| 66 | uses: actions/checkout@v2 |
| 67 | - name: Fetch Status |
| 68 | run: git submodule status TMessagesProj/jni/boringssl > boringssl_status |
| 69 | - name: BoringSSL Cache |
| 70 | id: cache |
| 71 | uses: actions/cache@v2 |
| 72 | with: |
| 73 | path: | |
| 74 | TMessagesProj/jni/boringssl/build |
| 75 | key: ${{ hashFiles('boringssl_status') }} |
| 76 | - name: Setup Android SDK Tools |
| 77 | uses: android-actions/setup-android@v2 |
| 78 | if: steps.cache.outputs.cache-hit != 'true' |
| 79 | - name: Install NDK |
| 80 | if: steps.cache.outputs.cache-hit != 'true' |
| 81 | run: | |
| 82 | echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null |
| 83 | echo "sdk.dir=${ANDROID_HOME}" > local.properties |
| 84 | echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties |
| 85 | - name: Native Build |
| 86 | if: steps.cache.outputs.cache-hit != 'true' |
| 87 | run: | |
| 88 | ./run init action boringssl |
| 89 | ./run init libs boringssl |
| 90 | native: |
| 91 | name: Native Build (Telegram) |
| 92 | runs-on: ubuntu-latest |
| 93 | needs: |
| 94 | - ffmpeg |
| 95 | - boringssl |
| 96 | strategy: |
| 97 | matrix: |
| 98 | flavor: |
| 99 | - armeabi-v7a |
| 100 | - arm64-v8a |
| 101 | - x86 |
| 102 | - x86_64 |
| 103 | steps: |
| 104 | - name: Checkout |
| 105 | uses: actions/checkout@v2 |
| 106 | - name: Fetch Status |
| 107 | run: | |
| 108 | git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status |
| 109 | git submodule status TMessagesProj/jni/libvpx > libvpx_status |
| 110 | git submodule status TMessagesProj/jni/boringssl > boringssl_status |
| 111 | - name: Native Cache |
| 112 | id: cache |
| 113 | uses: actions/cache@v2 |
| 114 | with: |
| 115 | path: | |
| 116 | TMessagesProj/src/main/libs |
| 117 | key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-${{ matrix.flavor }} |
| 118 | - name: Checkout Library |
| 119 | if: steps.cache.outputs.cache-hit != 'true' |
| 120 | run: | |
| 121 | git submodule update --init 'TMessagesProj/jni/*' |
| 122 | - name: FFmpeg Cache |
| 123 | uses: actions/cache@v2 |
| 124 | if: steps.cache.outputs.cache-hit != 'true' |
| 125 | with: |
| 126 | path: | |
| 127 | TMessagesProj/jni/ffmpeg/build |
| 128 | TMessagesProj/jni/libvpx/build |
| 129 | key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} |
| 130 | - name: BoringSSL Cache |
| 131 | uses: actions/cache@v2 |
| 132 | if: steps.cache.outputs.cache-hit != 'true' |
| 133 | with: |
| 134 | path: | |
| 135 | TMessagesProj/jni/boringssl/build |
| 136 | key: ${{ hashFiles('boringssl_status') }} |
| 137 | - name: Setup Android SDK Tools |
| 138 | uses: android-actions/setup-android@v2 |
| 139 | if: steps.cache.outputs.cache-hit != 'true' |
| 140 | - name: Install NDK |
| 141 | if: steps.cache.outputs.cache-hit != 'true' |
| 142 | run: | |
| 143 | echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null |
| 144 | echo "sdk.dir=${ANDROID_HOME}" > local.properties |
| 145 | echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties |
| 146 | - name: Fix BoringSSL |
| 147 | if: steps.cache.outputs.cache-hit != 'true' |
| 148 | run: | |
| 149 | cd TMessagesProj/jni |
| 150 | ./patch_boringssl.sh |
| 151 | - name: Native Build |
| 152 | if: steps.cache.outputs.cache-hit != 'true' |
| 153 | run: | |
| 154 | export NATIVE_TARGET="${{ matrix.flavor }}" |
| 155 | ./run libs native |
| 156 | v2ray: |
| 157 | name: Native Build (V2ray) |
| 158 | runs-on: ubuntu-latest |
| 159 | needs: check |
| 160 | steps: |
| 161 | - name: Checkout |
| 162 | uses: actions/checkout@v2 |
| 163 | - name: Fetch Status |
| 164 | run: git submodule status v2ray > v2ray_status |
| 165 | - name: V2ray Cache |
| 166 | id: cache |
| 167 | uses: actions/cache@v2 |
| 168 | with: |
| 169 | path: | |
| 170 | TMessagesProj/libs/libv2ray.aar |
| 171 | key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }} |
| 172 | - name: Setup Android SDK Tools |
| 173 | uses: android-actions/setup-android@v2 |
| 174 | if: steps.cache.outputs.cache-hit != 'true' |
| 175 | - name: Install NDK |
| 176 | if: steps.cache.outputs.cache-hit != 'true' |
| 177 | run: | |
| 178 | echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null |
| 179 | echo "sdk.dir=${ANDROID_HOME}" > local.properties |
| 180 | echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties |
| 181 | - name: Install Golang |
| 182 | uses: actions/setup-go@v2 |
| 183 | if: steps.cache.outputs.cache-hit != 'true' |
| 184 | with: |
| 185 | go-version: 1.16 |
| 186 | - name: Native Build |
| 187 | if: steps.cache.outputs.cache-hit != 'true' |
| 188 | run: ./run libs v2ray |
| 189 | shadowsocks: |
| 190 | name: Native Build (Shadowsocks) |
| 191 | runs-on: ubuntu-latest |
| 192 | needs: check |
| 193 | steps: |
| 194 | - name: Checkout |
| 195 | uses: actions/checkout@v2 |
| 196 | - name: Fetch Status |
| 197 | run: git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status |
| 198 | - name: Shadowsocks Cache |
| 199 | id: cache |
| 200 | uses: actions/cache@v2 |
| 201 | with: |
| 202 | path: | |
| 203 | TMessagesProj/libs/ss-rust-release.aar |
| 204 | key: ${{ hashFiles('shadowsocks_status') }} |
| 205 | - name: Setup Android SDK Tools |
| 206 | uses: android-actions/setup-android@v2 |
| 207 | if: steps.cache.outputs.cache-hit != 'true' |
| 208 | - name: Install NDK |
| 209 | if: steps.cache.outputs.cache-hit != 'true' |
| 210 | run: | |
| 211 | echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null |
| 212 | echo "sdk.dir=${ANDROID_HOME}" > local.properties |
| 213 | echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties |
| 214 | - name: Install Rust |
| 215 | if: steps.cache.outputs.cache-hit != 'true' |
| 216 | run: ./run init action shadowsocks |
| 217 | - name: Native Build |
| 218 | if: steps.cache.outputs.cache-hit != 'true' |
| 219 | run: ./run libs shadowsocks |
| 220 | shadowsocksr: |
| 221 | name: Native Build (ShadowsocksR) |
| 222 | runs-on: ubuntu-latest |
| 223 | needs: check |
| 224 | steps: |
| 225 | - name: Checkout |
| 226 | uses: actions/checkout@v2 |
| 227 | - name: Fetch Status |
| 228 | run: git submodule status 'ssr-libev/*' > shadowsocksr_status |
| 229 | - name: ShadowsocksR Cache |
| 230 | id: cache |
| 231 | uses: actions/cache@v2 |
| 232 | with: |
| 233 | path: | |
| 234 | TMessagesProj/libs/ssr-libev-release.aar |
| 235 | key: ${{ hashFiles('shadowsocksr_status') }} |
| 236 | - name: Setup Android SDK Tools |
| 237 | uses: android-actions/setup-android@v2 |
| 238 | if: steps.cache.outputs.cache-hit != 'true' |
| 239 | - name: Install NDK |
| 240 | if: steps.cache.outputs.cache-hit != 'true' |
| 241 | run: | |
| 242 | echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null |
| 243 | echo "sdk.dir=${ANDROID_HOME}" > local.properties |
| 244 | echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties |
| 245 | - name: Native Build |
| 246 | if: steps.cache.outputs.cache-hit != 'true' |
| 247 | run: ./run libs ssr |
| 248 | build: |
| 249 | name: Gradle Build |
| 250 | runs-on: ubuntu-latest |
| 251 | needs: |
| 252 | - native |
| 253 | - v2ray |
| 254 | - shadowsocks |
| 255 | - shadowsocksr |
| 256 | strategy: |
| 257 | matrix: |
| 258 | flavor: |
| 259 | - FullRelease |
| 260 | - FullReleaseNoGcm |
| 261 | - MiniRelease |
| 262 | - MiniReleaseNoGcm |
| 263 | steps: |
| 264 | - name: Checkout |
| 265 | uses: actions/checkout@v2 |
| 266 | - name: Setup Android SDK Tools |
| 267 | uses: android-actions/setup-android@v2 |
| 268 | - name: Fetch Status |
| 269 | run: | |
| 270 | git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status |
| 271 | git submodule status TMessagesProj/jni/boringssl > boringssl_status |
| 272 | git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status |
| 273 | git submodule status 'ssr-libev/*' > shadowsocksr_status |
| 274 | git submodule status v2ray > v2ray_status |
| 275 | - name: Native Cache (armeabi-v7a) |
| 276 | uses: actions/cache@v2 |
| 277 | with: |
| 278 | path: | |
| 279 | TMessagesProj/src/main/libs |
| 280 | key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-armeabi-v7a |
| 281 | - name: Native Cache (arm64-v8a) |
| 282 | uses: actions/cache@v2 |
| 283 | with: |
| 284 | path: | |
| 285 | TMessagesProj/src/main/libs |
| 286 | key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-arm64-v8a |
| 287 | - name: Native Cache (x86) |
| 288 | uses: actions/cache@v2 |
| 289 | with: |
| 290 | path: | |
| 291 | TMessagesProj/src/main/libs |
| 292 | key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-x86 |
| 293 | - name: Native Cache (x86_64) |
| 294 | uses: actions/cache@v2 |
| 295 | with: |
| 296 | path: | |
| 297 | TMessagesProj/src/main/libs |
| 298 | key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-x86_64 |
| 299 | - name: V2ray Cache |
| 300 | uses: actions/cache@v2 |
| 301 | with: |
| 302 | path: | |
| 303 | TMessagesProj/libs/libv2ray.aar |
| 304 | key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }} |
| 305 | - name: Shadowsocks Cache |
| 306 | uses: actions/cache@v2 |
| 307 | with: |
| 308 | path: | |
| 309 | TMessagesProj/libs/ss-rust-release.aar |
| 310 | key: ${{ hashFiles('shadowsocks_status') }} |
| 311 | - name: ShadowsocksR Cache |
| 312 | uses: actions/cache@v2 |
| 313 | with: |
| 314 | path: | |
| 315 | TMessagesProj/libs/ssr-libev-release.aar |
| 316 | key: ${{ hashFiles('shadowsocksr_status') }} |
| 317 | - name: Fix Gradle Memoery |
| 318 | run: | |
| 319 | sed -i -e "s/16384/6144/g" gradle.properties |
| 320 | echo "ndk.dir=${ANDROID_HOME}/ndk-bundle" > local.properties |
| 321 | - name: Gradle cache |
| 322 | uses: actions/cache@v2 |
| 323 | with: |
| 324 | path: ~/.gradle |
| 325 | key: gradle-${{ hashFiles('**/*.gradle') }} |
| 326 | - name: Release Build |
| 327 | run: | |
| 328 | export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}" |
| 329 | ./gradlew TMessagesProj:assemble${{ matrix.flavor }} |
| 330 |
| 331 | APK=$(find TMessagesProj/build/outputs/apk -name '*arm64-v8a*.apk') |
| 332 | APK=$(dirname $APK) |
| 333 | echo "APK=$APK" >> $GITHUB_ENV |
| 334 | - uses: actions/upload-artifact@v2 |
| 335 | with: |
| 336 | name: ${{ matrix.flavor }} |
| 337 | path: ${{ env.APK }} |
| 338 | publish: |
| 339 | name: Publish Release |
| 340 | if: github.event.inputs.publish != 'y' |
| 341 | runs-on: ubuntu-latest |
| 342 | needs: build |
| 343 | steps: |
| 344 | - name: Checkout |
| 345 | uses: actions/checkout@v2 |
| 346 | - name: Donwload Artifacts |
| 347 | uses: actions/download-artifact@v2 |
| 348 | with: |
| 349 | path: artifacts |
| 350 | - name: Release |
| 351 | run: | |
| 352 | wget -O ghr.tar.gz https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz |
| 353 | tar -xvf ghr.tar.gz |
| 354 | mv ghr*linux_amd64/ghr . |
| 355 | mkdir apks |
| 356 | find artifacts -name "*.apk" -exec cp {} apks \; |
| 357 | ./ghr -delete -t "${{ github.token }}" -n "${{ github.event.inputs.tag }}" "${{ github.event.inputs.tag }}" apks |
| 358 | upload: |
| 359 | name: Upload Release |
| 360 | if: github.event.inputs.upload != 'y' |
| 361 | runs-on: ubuntu-latest |
| 362 | needs: |
| 363 | - build |
| 364 | - telegram-bot-api |
| 365 | steps: |
| 366 | - name: Donwload Artifacts |
| 367 | uses: actions/download-artifact@v2 |
| 368 | with: |
| 369 | path: artifacts |
| 370 | - name: Download Telegram Bot API Binary |
| 371 | uses: actions/download-artifact@master |
| 372 | with: |
| 373 | name: telegram-bot-api-binary |
| 374 | path: . |
| 375 | - name: Release |
| 376 | run: | |
| 377 | chmod +x telegram-bot-api-binary |
| 378 | ./telegram-bot-api-binary --api-id=21724 --api-hash=3e0cb5efcd52300aec5994fdfc5bdc16 --local 2>&1 > /dev/null & |
| 379 | curl http://127.0.0.1:8081/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage \ |
| 380 | -X POST \ |
| 381 | -F chat_id="${{ secrets.TELEGRAM_CHANNEL }}" \ |
| 382 | -F text="==== ${{ github.event.inputs.tag }} ====" \ |
| 383 | --silent --show-error --fail >/dev/null |
| 384 | mkdir apks |
| 385 | find artifacts -name "*.apk" -exec cp {} apks \; |
| 386 | function upload() { |
| 387 | for apk in $@; do |
| 388 | echo ">> Uploading $apk" |
| 389 | curl http://127.0.0.1:8081/bot${{ secrets.TELEGRAM_TOKEN }}/sendDocument \ |
| 390 | -X POST \ |
| 391 | -F chat_id="${{ secrets.TELEGRAM_CHANNEL }}" \ |
| 392 | -F document="@$apk" \ |
| 393 | --retry 5 \ |
| 394 | --retry-delay 5 \ |
| 395 | --silent --show-error --fail >/dev/null |
| 396 | sleep 1 |
| 397 | done |
| 398 | } |
| 399 | upload apks/NekoX-*-mini-*-release.apk |
| 400 | upload apks/NekoX-*-mini-*-releaseNoGcm.apk |
| 401 | upload apks/NekoX-*-full-*-release.apk |
| 402 | upload apks/NekoX-*-full-*-releaseNoGcm.apk |
| 403 | pkill telegram-bot |
| 404 | play: |
| 405 | name: Publish to Play Store |
| 406 | if: github.event.inputs.play != 'y' |
| 407 | runs-on: ubuntu-latest |
| 408 | needs: |
| 409 | - native |
| 410 | - v2ray |
| 411 | - shadowsocks |
| 412 | - shadowsocksr |
| 413 | steps: |
| 414 | - name: Checkout |
| 415 | uses: actions/checkout@v2 |
| 416 | - name: Setup Android SDK Tools |
| 417 | uses: android-actions/setup-android@v2 |
| 418 | - name: Fetch Status |
| 419 | run: | |
| 420 | git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status |
| 421 | git submodule status TMessagesProj/jni/boringssl > boringssl_status |
| 422 | git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status |
| 423 | git submodule status 'ssr-libev/*' > shadowsocksr_status |
| 424 | git submodule status v2ray > v2ray_status |
| 425 | - name: Native Cache (armeabi-v7a) |
| 426 | uses: actions/cache@v2 |
| 427 | with: |
| 428 | path: | |
| 429 | TMessagesProj/src/main/libs |
| 430 | key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-armeabi-v7a |
| 431 | - name: Native Cache (arm64-v8a) |
| 432 | uses: actions/cache@v2 |
| 433 | with: |
| 434 | path: | |
| 435 | TMessagesProj/src/main/libs |
| 436 | key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-arm64-v8a |
| 437 | - name: Native Cache (x86) |
| 438 | uses: actions/cache@v2 |
| 439 | with: |
| 440 | path: | |
| 441 | TMessagesProj/src/main/libs |
| 442 | key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-x86 |
| 443 | - name: Native Cache (x86_64) |
| 444 | uses: actions/cache@v2 |
| 445 | with: |
| 446 | path: | |
| 447 | TMessagesProj/src/main/libs |
| 448 | key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-x86_64 |
| 449 | - name: V2ray Cache |
| 450 | uses: actions/cache@v2 |
| 451 | with: |
| 452 | path: | |
| 453 | TMessagesProj/libs/libv2ray.aar |
| 454 | key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }} |
| 455 | - name: Shadowsocks Cache |
| 456 | uses: actions/cache@v2 |
| 457 | with: |
| 458 | path: | |
| 459 | TMessagesProj/libs/ss-rust-release.aar |
| 460 | key: ${{ hashFiles('shadowsocks_status') }} |
| 461 | - name: ShadowsocksR Cache |
| 462 | uses: actions/cache@v2 |
| 463 | with: |
| 464 | path: | |
| 465 | TMessagesProj/libs/ssr-libev-release.aar |
| 466 | key: ${{ hashFiles('shadowsocksr_status') }} |
| 467 | - name: Fix Gradle Memoery |
| 468 | run: | |
| 469 | sed -i -e "s/16384/6144/g" gradle.properties |
| 470 | echo "ndk.dir=${ANDROID_HOME}/ndk-bundle" > local.properties |
| 471 | - name: Gradle cache |
| 472 | uses: actions/cache@v2 |
| 473 | with: |
| 474 | path: ~/.gradle |
| 475 | key: gradle-${{ hashFiles('**/*.gradle') }} |
| 476 | - name: Publish to Play Store |
| 477 | run: | |
| 478 | export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}" |
| 479 | cat > service_account_credentials.json << EOF |
| 480 | ${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }}" |
| 481 | EOF |
| 482 | sed -i -e 's@<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />@@g' TMessagesProj/src/main/AndroidManifest.xml |
| 483 | ./gradlew TMessagesProj:publishMiniPlayReleaseApk |
| 484 |
| 485 | telegram-bot-api: |
| 486 | name: Telegram Bot API |
| 487 | runs-on: ubuntu-latest |
| 488 | steps: |
| 489 | - name: Checkout |
| 490 | uses: actions/checkout@v2 |
| 491 | - name: Clone Telegram Bot API |
| 492 | run: | |
| 493 | git clone --recursive https://github.com/tdlib/telegram-bot-api.git |
| 494 | git status telegram-bot-api >> telegram-bot-api-status |
| 495 | - name: Cache Bot API Binary |
| 496 | id: cache-bot-api |
| 497 | uses: actions/cache@v2 |
| 498 | with: |
| 499 | path: telegram-bot-api-binary |
| 500 | key: CI-telegram-bot-api-${{ hashFiles('telegram-bot-api-status') }} |
| 501 | - name: Compile Telegram Bot API |
| 502 | if: steps.cache-bot-api.outputs.cache-hit != 'true' |
| 503 | run: | |
| 504 | sudo apt-get update |
| 505 | sudo apt-get install make git zlib1g-dev libssl-dev gperf cmake g++ |
| 506 | cd telegram-bot-api |
| 507 | rm -rf build |
| 508 | mkdir build |
| 509 | cd build |
| 510 | cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=.. .. |
| 511 | cmake --build . --target install -j$(nproc) |
| 512 | cd ../.. |
| 513 | ls -l telegram-bot-api/bin/telegram-bot-api* |
| 514 | cp telegram-bot-api/bin/telegram-bot-api telegram-bot-api-binary |
| 515 | - name: Upload Binary |
| 516 | uses: actions/upload-artifact@master |
| 517 | with: |
| 518 | name: telegram-bot-api-binary |
| 519 | path: telegram-bot-api-binary |