2020-01-25 05:44:58 +00:00
|
|
|
name: Snap.
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
2020-04-12 05:17:44 +00:00
|
|
|
- '**.md'
|
2020-04-30 14:57:01 +00:00
|
|
|
- 'changelog.txt'
|
|
|
|
- 'LEGAL'
|
|
|
|
- 'LICENSE'
|
|
|
|
- '.github/**'
|
|
|
|
- '!.github/workflows/snap.yml'
|
|
|
|
- 'Telegram/build/**'
|
|
|
|
- 'Telegram/Resources/uwp/**'
|
|
|
|
- 'Telegram/Resources/winrc/**'
|
|
|
|
- 'Telegram/SourceFiles/platform/win/**'
|
|
|
|
- 'Telegram/SourceFiles/platform/mac/**'
|
|
|
|
- 'Telegram/Telegram/**'
|
|
|
|
- 'Telegram/configure.bat'
|
|
|
|
- 'Telegram/Telegram.plist'
|
2020-01-25 05:44:58 +00:00
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
2020-04-12 05:17:44 +00:00
|
|
|
- '**.md'
|
2020-04-30 14:57:01 +00:00
|
|
|
- 'changelog.txt'
|
|
|
|
- 'LEGAL'
|
|
|
|
- 'LICENSE'
|
|
|
|
- '.github/**'
|
|
|
|
- '!.github/workflows/snap.yml'
|
|
|
|
- 'Telegram/build/**'
|
|
|
|
- 'Telegram/Resources/uwp/**'
|
|
|
|
- 'Telegram/Resources/winrc/**'
|
|
|
|
- 'Telegram/SourceFiles/platform/win/**'
|
|
|
|
- 'Telegram/SourceFiles/platform/mac/**'
|
|
|
|
- 'Telegram/Telegram/**'
|
|
|
|
- 'Telegram/configure.bat'
|
|
|
|
- 'Telegram/Telegram.plist'
|
2020-01-25 05:44:58 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
2022-06-15 14:21:37 +00:00
|
|
|
snap:
|
2020-09-10 11:29:45 +00:00
|
|
|
name: Ubuntu
|
2023-04-01 13:18:50 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2020-01-25 05:44:58 +00:00
|
|
|
|
|
|
|
env:
|
2024-04-03 15:09:00 +00:00
|
|
|
UPLOAD_ARTIFACT: "true"
|
2020-01-25 05:44:58 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Clone.
|
2022-11-07 12:32:59 +00:00
|
|
|
uses: actions/checkout@v3.1.0
|
2020-01-25 05:44:58 +00:00
|
|
|
with:
|
2020-12-24 02:07:07 +00:00
|
|
|
fetch-depth: 0
|
2020-01-25 05:44:58 +00:00
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: First set up.
|
|
|
|
run: |
|
2022-12-15 10:47:39 +00:00
|
|
|
sudo iptables -P FORWARD ACCEPT
|
2020-01-25 05:44:58 +00:00
|
|
|
sudo snap install --classic snapcraft
|
2020-08-19 03:41:41 +00:00
|
|
|
sudo usermod -aG lxd $USER
|
|
|
|
sudo snap run lxd init --auto
|
|
|
|
sudo snap run lxd waitready
|
|
|
|
|
2023-06-17 12:48:22 +00:00
|
|
|
- name: Free up some disk space.
|
2023-09-29 15:29:53 +00:00
|
|
|
uses: jlumbroso/free-disk-space@f68fdb76e2ea636224182cfb7377ff9a1708f9b8
|
2023-06-17 12:48:22 +00:00
|
|
|
|
2020-01-25 05:44:58 +00:00
|
|
|
- name: Telegram Desktop snap build.
|
2022-06-15 14:21:37 +00:00
|
|
|
run: sg lxd -c 'snap run snapcraft -v'
|
2020-01-25 05:44:58 +00:00
|
|
|
|
|
|
|
- name: Move artifact.
|
|
|
|
if: env.UPLOAD_ARTIFACT == 'true'
|
|
|
|
run: |
|
|
|
|
artifact_name=$(echo telegram-desktop_*.snap)
|
2020-10-25 01:46:27 +00:00
|
|
|
echo "ARTIFACT_NAME=$artifact_name" >> $GITHUB_ENV
|
2020-01-25 05:44:58 +00:00
|
|
|
|
|
|
|
mkdir artifact
|
|
|
|
mv $artifact_name artifact
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@master
|
|
|
|
if: env.UPLOAD_ARTIFACT == 'true'
|
|
|
|
name: Upload artifact.
|
|
|
|
with:
|
|
|
|
name: ${{ env.ARTIFACT_NAME }}
|
|
|
|
path: artifact
|