Add fake/scam/verified to more channels #63
Workflow file for this run
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: Linux Release. | |
on: | |
pull_request: | |
types: [opened, reopened] | |
branches-ignore: | |
- 'compare/**' | |
paths-ignore: | |
- 'docs/**' | |
- '**.md' | |
- 'changelog.txt' | |
- 'LEGAL' | |
- 'LICENSE' | |
- '.github/**' | |
- '!.github/workflows/linux_release.yml' | |
- 'snap/**' | |
- 'Telegram/build/**' | |
- 'Telegram/Resources/uwp/**' | |
- 'Telegram/Resources/winrc/**' | |
- 'Telegram/SourceFiles/platform/win/**' | |
- 'Telegram/SourceFiles/platform/mac/**' | |
- 'Telegram/Telegram/**' | |
- 'Telegram/configure.bat' | |
- 'Telegram/Telegram.plist' | |
workflow_dispatch: | |
jobs: | |
linux: | |
name: Rocky Linux 8 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
defines: | |
- "" | |
# - "DESKTOP_APP_DISABLE_X11_INTEGRATION" | |
env: | |
UPLOAD_ARTIFACT: "true" | |
steps: | |
- name: Get repository name. | |
run: echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV | |
- name: Clone. | |
uses: actions/checkout@v3.1.0 | |
with: | |
submodules: recursive | |
path: ${{ env.REPO_NAME }} | |
- name: First set up. | |
run: | | |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin | |
docker pull ghcr.io/$GITHUB_REPOSITORY/centos_env | |
docker tag ghcr.io/$GITHUB_REPOSITORY/centos_env tdesktop:centos_env | |
- name: Telegram Desktop build. | |
run: | | |
cd $REPO_NAME | |
ARTIFACT_PREFIX="" | |
if [ "${{ github.ref_name }}" != "${{ github.event.repository.default_branch }}" ]; then | |
echo Dev build: using non master branch: ${{ github.ref_name }} | |
ARTIFACT_PREFIX="dev" | |
fi | |
DEFINE="" | |
if [ -n "${{ matrix.defines }}" ]; then | |
DEFINE="-D ${{ matrix.defines }}=ON" | |
echo Define from matrix: $DEFINE | |
echo "ARTIFACT_NAME=${ARTIFACT_PREFIX}Telegram_${{ matrix.defines }}" >> $GITHUB_ENV | |
else | |
echo "ARTIFACT_NAME=${ARTIFACT_PREFIX}Telegram" >> $GITHUB_ENV | |
fi | |
# -D CMAKE_C_FLAGS="-Werror" | |
# -D CMAKE_CXX_FLAGS="-Werror" | |
# not used in actual Release build | |
docker run --rm \ | |
-v $PWD:/usr/src/tdesktop \ | |
-e CONFIG=Release \ | |
tdesktop:centos_env \ | |
/usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \ | |
-D CMAKE_C_FLAGS_DEBUG="" \ | |
-D CMAKE_CXX_FLAGS_DEBUG="" \ | |
-D CMAKE_EXE_LINKER_FLAGS="-s" \ | |
-D TDESKTOP_API_TEST=OFF \ | |
-D TDESKTOP_API_ID=${{ secrets.API_ID }} \ | |
-D TDESKTOP_API_HASH=${{ secrets.API_HASH }} \ | |
-D DESKTOP_APP_DISABLE_AUTOUPDATE=OFF \ | |
-D DESKTOP_APP_DISABLE_CRASH_REPORTS=OFF \ | |
-D CMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ | |
$DEFINE | |
- name: Check. | |
run: | | |
filePath="$REPO_NAME/out/Release/Telegram" | |
if test -f "$filePath"; then | |
echo "Build successfully done! :)" | |
size=$(stat -c %s "$filePath") | |
echo "File size of ${filePath}: ${size} Bytes." | |
else | |
echo "Build error, output file does not exist." | |
exit 1 | |
fi | |
- name: Move artifact. | |
if: env.UPLOAD_ARTIFACT == 'true' | |
run: | | |
cd $REPO_NAME | |
mkdir artifact | |
mkdir "artifact/Telegram" | |
cp out/Release/Telegram artifact/Telegram/ | |
strip -s "artifact/Telegram/Telegram" | |
cd artifact | |
tar -cJvf "${{ env.ARTIFACT_NAME }}_linux.tar.xz" "Telegram/" | |
rm -rf Telegram/ | |
# mv {Telegram,Updater} artifact/ | |
- uses: actions/upload-artifact@master | |
if: env.UPLOAD_ARTIFACT == 'true' | |
name: Upload artifact. | |
with: | |
name: ${{ env.ARTIFACT_NAME }} | |
path: ${{ env.REPO_NAME }}/artifact/ |