Add AppImage to pipeline

master
Jeremy HU 2022-12-13 22:37:18 +11:00
parent ebc72f30a0
commit adc43e1838
5 changed files with 39 additions and 3 deletions

View File

@ -4,6 +4,7 @@ on:
push:
branches:
- master
- pipeline
tags:
- '*'
pull_request:
@ -27,15 +28,24 @@ jobs:
exit 1
fi
build:
runs-on: ubuntu-latest
# Use oldest ubuntu to make AppImage work
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v3
- name: Install Qt
run: |
sudo apt-get update
sudo apt-get install -y qtbase5-dev qt5-qmake libqt5svg5-dev
sudo apt-get install -y qt5-default libqt5svg5-dev
- name: Build application
run: |
cd ${GITHUB_WORKSPACE}/application
qmake
make
make -j`nproc`
- name: Generate AppImage
run: |
sudo apt-get install -y libfuse2
cd ${GITHUB_WORKSPACE} && sh ./ci/appimage/bundle.sh
- name: Archive AppImage
uses: actions/upload-artifact@v3
with:
path: Dust3D-x86_64.AppImage

19
ci/appimage/bundle.sh Normal file
View File

@ -0,0 +1,19 @@
# Exit when any command fails
set -e
# Download appimage tools
wget --no-verbose -O ./ci/appimage/linuxdeployqt-continuous-x86_64.AppImage https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
chmod a+x ./ci/appimage/linuxdeployqt-continuous-x86_64.AppImage
# Create appdir directories
mkdir -p appdir/usr/share/applications
mkdir -p appdir/usr/bin
# Copy application related files
cp ./ci/appimage/dust3d.png appdir/dust3d.png
cp ./ci/appimage/dust3d.desktop appdir/usr/share/applications/dust3d.desktop
cp ./application/dust3d appdir/usr/bin/dust3d
# Make bundle
./ci/appimage/linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage
mv Dust3D-*-x86_64.AppImage Dust3D-x86_64.AppImage

View File

@ -0,0 +1,7 @@
[Desktop Entry]
Type=Application
Name=Dust3D
Icon=dust3d
Exec=dust3d
Categories=Graphics;
Comment=A quick 3D modeling tool

BIN
ci/appimage/dust3d.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
ci/screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 KiB