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/Patches/**'
|
2020-08-17 06:29:18 +00:00
|
|
|
- '!Telegram/Patches/ffmpeg.diff'
|
2020-04-30 14:57:01 +00:00
|
|
|
- '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/Patches/**'
|
2020-08-17 06:29:18 +00:00
|
|
|
- '!Telegram/Patches/ffmpeg.diff'
|
2020-04-30 14:57:01 +00:00
|
|
|
- '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:
|
|
|
|
|
|
|
|
linux:
|
2020-05-15 18:36:35 +00:00
|
|
|
name: Ubuntu 20.04
|
|
|
|
runs-on: ubuntu-20.04
|
2020-01-25 05:44:58 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
UPLOAD_ARTIFACT: "false"
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Clone.
|
2020-03-20 16:32:06 +00:00
|
|
|
uses: actions/checkout@v2
|
2020-01-25 05:44:58 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: First set up.
|
|
|
|
run: |
|
2020-06-01 11:08:16 +00:00
|
|
|
# Workaround for permanent problems with third-party repository keys
|
|
|
|
sudo rm -rf /etc/apt/sources.list.d/*
|
|
|
|
|
2020-01-25 05:44:58 +00:00
|
|
|
sudo apt-get update
|
|
|
|
sudo snap install --classic snapcraft
|
|
|
|
|
|
|
|
# Workaround for snapcraft
|
2020-03-20 20:26:04 +00:00
|
|
|
# See https://forum.snapcraft.io/t/13258
|
2020-01-25 05:44:58 +00:00
|
|
|
sudo chown root:root /
|
|
|
|
|
|
|
|
- name: Telegram Desktop snap build.
|
2020-04-18 17:30:36 +00:00
|
|
|
run: sudo snap run snapcraft --destructive-mode
|
2020-01-25 05:44:58 +00:00
|
|
|
|
|
|
|
- name: Move artifact.
|
|
|
|
if: env.UPLOAD_ARTIFACT == 'true'
|
|
|
|
run: |
|
|
|
|
artifact_name=$(echo telegram-desktop_*.snap)
|
|
|
|
echo ::set-env name=ARTIFACT_NAME::$artifact_name
|
|
|
|
|
|
|
|
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
|