build-shotcut-linux #1583
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: 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 |