-
Notifications
You must be signed in to change notification settings - Fork 1.1k
98 lines (88 loc) · 3.33 KB
/
build-linux.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: build-shotcut-linux
on:
workflow_dispatch:
schedule:
# nightly
- cron: '0 8 * * *'
env:
IMAGE_NAME: mltframework/shotcut-build:qt6.4.3-ubuntu20.04
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
echo Preparing version
echo $(date +"%y.%m.%d") > VERSION
VERSION=$(cat VERSION)
echo VERSION=$VERSION
FILENAME_VERSION=$(echo $VERSION | tr -d .)
cd scripts
echo Making build script config file
echo CLEANUP=0 > build-shotcut.conf
echo SHOTCUT_VERSION=\"$VERSION\" >> build-shotcut.conf
docker run -v $PWD:/root/shotcut $IMAGE_NAME
echo Renaming build artifacts
mv shotcut.txz shotcut-linux-x86_64-$FILENAME_VERSION.txz
mv src.txz shotcut-src-$FILENAME_VERSION.txz
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: linux-portable
path: |
scripts/shotcut-linux-x86_64-*.txz
- name: Upload portable and source archives to S3
if: ${{ github.repository_owner == 'mltframework' }}
uses: mltframework/s3cmd-action@v0
with:
args: >-
--access_key=${{ secrets.AWS_ACCESS_KEY }}
--secret_key=${{ secrets.AWS_SECRET_KEY }}
--acl-public
--stop-on-error
put scripts/*.txz s3://builds.us.meltytech/shotcut/
- name: Package AppImage
run: |
sudo apt install desktop-file-utils libfuse2
mkdir packaging/linux/Shotcut
cp VERSION packaging/linux/Shotcut/
cd packaging/linux
wget https://raw.githubusercontent.com/probonopd/AppImages/master/pkg2appimage
bash -ex pkg2appimage appimage/appimage.yml
FILENAME_VERSION=$(cat Shotcut/VERSION | tr -d .)
mv out/*.AppImage out/shotcut-linux-x86_64-$FILENAME_VERSION.AppImage
- name: Upload AppImage to S3
if: ${{ github.repository_owner == 'mltframework' }}
uses: mltframework/s3cmd-action@v0
with:
args: >-
--access_key=${{ secrets.AWS_ACCESS_KEY }}
--secret_key=${{ secrets.AWS_SECRET_KEY }}
--acl-public
--stop-on-error
put packaging/linux/out/*.AppImage s3://builds.us.meltytech/shotcut/
- name: Prepare snap
run: |
VERSION=$(cat VERSION)
mv scripts/shotcut-linux-x86_64-*.txz packaging/linux
cd packaging/linux
mkdir -p snap/gui
cp ../../icons/shotcut-logo-64.png snap/gui
sed 's|Icon=.*|Icon=${SNAP}/meta/gui/shotcut-logo-64.png|' org.shotcut.Shotcut.desktop > snap/gui/shotcut.desktop
FILENAME=$(ls *.txz)
sed "s/\$VERSION/${VERSION}/ ; s/\$FILENAME/${FILENAME}/" snapcraft.yaml.in > snap/snapcraft.yaml
- name: Package snap
if: ${{ github.repository_owner == 'mltframework' }}
uses: snapcore/action-build@v1
id: snap
with:
path: packaging/linux
- name: Publish snap
if: ${{ github.repository_owner == 'mltframework' }}
uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
with:
snap: ${{ steps.snap.outputs.snap }}
release: edge