Added translations. #616
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | |
with: | |
submodules: true | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- uses: nttld/[email protected] | |
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 | |
./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" | |
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/[email protected] | |
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/ |