diff --git a/.github/workflows/DEPLOYING.yml b/.github/workflows/DEPLOYING.yml index 5832607e..0a6db55f 100644 --- a/.github/workflows/DEPLOYING.yml +++ b/.github/workflows/DEPLOYING.yml @@ -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 \ No newline at end of file + 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 \ No newline at end of file diff --git a/ci/appimage/bundle.sh b/ci/appimage/bundle.sh new file mode 100644 index 00000000..72a85b77 --- /dev/null +++ b/ci/appimage/bundle.sh @@ -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 \ No newline at end of file diff --git a/ci/appimage/dust3d.desktop b/ci/appimage/dust3d.desktop new file mode 100644 index 00000000..eec22357 --- /dev/null +++ b/ci/appimage/dust3d.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=Dust3D +Icon=dust3d +Exec=dust3d +Categories=Graphics; +Comment=A quick 3D modeling tool diff --git a/ci/appimage/dust3d.png b/ci/appimage/dust3d.png new file mode 100644 index 00000000..7c12b6fb Binary files /dev/null and b/ci/appimage/dust3d.png differ diff --git a/ci/screenshot.png b/ci/screenshot.png new file mode 100644 index 00000000..7841f47e Binary files /dev/null and b/ci/screenshot.png differ