Skip to content

Bumped version.

Bumped version. #655

Workflow file for this run

name: Fork Client
on: [push]
jobs:
linux:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
type: [debug, release]
include:
- type: debug
afat: assembleAfatDebug
name: ""
updates: 1
- type: release
afat: assembleAfatRelease
name: " compressed"
updates: 0
steps:
- uses: actions/checkout@v3.1.0
with:
submodules: true
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: nttld/setup-ndk@v1.4.2
id: setup-ndk
with:
ndk-version: r21e
link-to-sdk: true
- name: Prepare additional build number.
env:
ADDITIONAL_BUILD: ${{ secrets.ADDITIONAL_BUILD_NUMBER }}
run: |
result=$((ADDITIONAL_BUILD / 10000))
echo "ADDITIONAL_BUILD_NUMBER = $result should be between 0 and 10!"
echo "ADDITIONAL_BUILD_NUMBER=$result" >> $GITHUB_ENV
echo "USER_REPO=$GITHUB_REPOSITORY" >> $GITHUB_ENV
echo "CHECK_UPDATES=${{ matrix.updates }}" >> $GITHUB_ENV
- name: Build.
run: |
###
vars=gradle.properties
echo "DUMMY_CONST=0" >> $vars
echo "org.gradle.workers.max=1" >> $vars
echo "APP_ID=${{ secrets.APP_ID }}" >> $vars
echo "APP_HASH=${{ secrets.APP_HASH }}" >> $vars
echo "RELEASE_KEY_PASSWORD=${{ secrets.ALIAS_PASS }}" >> $vars
echo "RELEASE_KEY_ALIAS=${{ secrets.ALIAS_NAME }}" >> $vars
echo "RELEASE_STORE_PASSWORD=${{ secrets.KEYSTORE_PASS }}" >> $vars
echo "ADDITIONAL_BUILD_NUMBER=$ADDITIONAL_BUILD_NUMBER" >> $vars
echo "USER_REPO=$USER_REPO" >> $vars
echo "CHECK_UPDATES=${{ matrix.updates }}" >> $vars
echo "USER_ID_OWNER=${{ secrets.USER_ID_OWNER }}" >> $vars
###
echo $ADDITIONAL_BUILD_NUMBER
sudo apt update
sudo apt -y install ninja-build meson unzip pip
./gradlew :TMessagesProj_App:${{ matrix.afat }}
#grep BUILD_VERSION_STRING TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java | cut -d'"' -f 2 > ver.txt
grep VERSION_NAME TMessagesProj/build/generated/source/buildConfig/${{ matrix.type }}/org/telegram/messenger/BuildConfig.java | cut -d'"' -f 2 > ver.txt
mkdir artifact
mv TMessagesProj_App/build/outputs/apk/afat/${{ matrix.type }}/app.apk app.apk
cp app.apk "artifact/ForkClient $(cat ver.txt)${{ matrix.name }}.apk"
mkdir tag_asset
cp app.apk "tag_asset/ForkClient_$(cat ver.txt)${{ matrix.name }}.apk"
# Upload to channel.
set +x
pip install tgcrypto
pip install https://github.com/KurimuzonAkuma/pyrogram/archive/dev.zip --force-reinstall
cp app.apk "ForkClient $(cat ver.txt)${{ matrix.name }}.apk"
echo "${{ secrets.BASE64_ZIP }}" | base64 --decode > output.zip
unzip -j output.zip -d .
ls
python3 upload.py
set -x
###
echo "NEW_TAG_TEXT=$(cat ver.txt)" >> $GITHUB_ENV
tempVer=$(cat ver.txt)
tempVer=${tempVer::-2}
echo "NEW_OFFICIAL_TAG_TEXT=$tempVer" >> $GITHUB_ENV
- name: Draft release.
uses: softprops/action-gh-release@v0.1.15
if: ${{ matrix.type == 'debug' }}
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
with:
draft: true
files: tag_asset/*
tag_name: ${{ env.NEW_TAG_TEXT }}
name: "ForkClient ${{ env.NEW_TAG_TEXT }}"
body: "— Updated to ${{ env.NEW_OFFICIAL_TAG_TEXT }} build of the official Telegram."
- uses: actions/upload-artifact@master
name: Upload artifact.
with:
name: ForkClient-${{ matrix.type }}
path: artifact/