-
Notifications
You must be signed in to change notification settings - Fork 96
65 lines (53 loc) · 2.18 KB
/
linux.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Build Linux
on:
push:
# branches: [ "main" ]
pull_request:
branches: ["main"]
jobs:
build-deb:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Prepare dependencies
run: |
sudo apt update
sudo apt install cmake libboost-thread-dev libasio-dev qt6-base-dev libqt6websockets6-dev libqt6gui6 libqt6widgets6 libqt6core5compat6-dev libgl1-mesa-dev libvlc-dev libvlccore-dev
env:
CI: 1
- name: Run build
run: |
./tools/build-linux.sh
env:
CI: 1
- name: Rename build
id: "rename-build"
shell: bash
run: |
TARGET=casparcg-client-${{ github.sha }}-ubuntu22.deb
mv build/CasparCG*.deb "$TARGET"
echo "artifactname=$TARGET" >> $GITHUB_OUTPUT
# check if a release branch, or main, or a tag
if [[ "${{ github.ref_name }}" == "main" || "${{ github.ref_name }}" == "2.3.x-lts" ]]
then
# Only proceed if we have an sftp password
if [ -n "${{ secrets.SFTP_PASSWORD }}" ]
then
echo "uploadname=$TARGET" >> $GITHUB_OUTPUT
fi
fi
- uses: actions/upload-artifact@v4
with:
name: upload-artifact
path: ${{ steps.rename-build.outputs.artifactname }}
- name: Copy single file to remote
uses: garygrossgarten/[email protected]
if: ${{ steps.rename-build.outputs.uploadname }}
with:
local: "${{ steps.rename-build.outputs.uploadname }}"
remote: "${{ secrets.SFTP_ROOT }}/${{ github.ref_name }}/${{ steps.rename-build.outputs.uploadname }}"
host: ${{ secrets.SFTP_HOST }}
username: ${{ secrets.SFTP_USERNAME }}
password: ${{ secrets.SFTP_PASSWORD }}