Merge pull request #86 from 0xzer0x/release/1.2.8 #6
Workflow file for this run
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: Linux Deployment | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "v*.*.*" | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
appimage: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set APP_VER env variable | |
run: echo "APP_VER=$(cat ${{github.workspace}}/VERSION)" >> "$GITHUB_ENV" | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
aqtversion: ==3.1.* | |
version: 6.6.* | |
host: linux | |
target: desktop | |
arch: gcc_64 | |
modules: >- | |
qtimageformats | |
qtmultimedia | |
qtnetworkauth | |
qtwaylandcompositor | |
- name: Install tools | |
run: > | |
sudo apt update -y && sudo apt install wget fuse libxcb-cursor0 appstream appstream-util ninja-build -y | |
wget | |
https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage | |
wget | |
https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage | |
chmod +x linuxdeployqt-continuous-x86_64.AppImage | |
chmod +x appimagetool-x86_64.AppImage | |
- name: Prepare AppDir | |
run: > | |
mkdir -p QuranCompanion.AppDir/usr/{bin,share/{applications,metainfo,icons/hicolor/256x256/apps}} | |
cp | |
${{github.workspace}}/dist/xdg/io.github._0xzer0x.qurancompanion.desktop | |
QuranCompanion.AppDir/ | |
cp ${{github.workspace}}/dist/xdg/logo256.png | |
QuranCompanion.AppDir/io.github._0xzer0x.qurancompanion.png | |
cp | |
${{github.workspace}}/dist/xdg/io.github._0xzer0x.qurancompanion.desktop | |
QuranCompanion.AppDir/usr/share/applications/ | |
cp ${{github.workspace}}/dist/xdg/logo256.png | |
QuranCompanion.AppDir/usr/share/icons/hicolor/256x256/apps/io.github._0xzer0x.qurancompanion.png | |
cp ${{github.workspace}}/dist/xdg/io.github._0xzer0x.qurancompanion.metainfo.xml | |
QuranCompanion.AppDir/usr/share/metainfo/io.github._0xzer0x.qurancompanion.appdata.xml | |
echo -e "[Paths]\nPlugins = ../plugins\nLibraries = ../lib\nImports = | |
../qml\nQml2Imports = ../qml" > QuranCompanion.AppDir/usr/bin/qt.conf | |
- name: Configure | |
run: >- | |
cmake -B ${{github.workspace}}/build | |
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
run: "cmake --build ${{github.workspace}}/build" | |
- name: Install | |
run: >- | |
cmake --install ${{github.workspace}}/build --prefix | |
QuranCompanion.AppDir/usr | |
- name: Run linuxdeployqt | |
run: > | |
rm ${QT_PLUGIN_PATH}/sqldrivers/libqsqlmimer.so ${QT_PLUGIN_PATH}/sqldrivers/libqsqlmysql.so ${QT_PLUGIN_PATH}/sqldrivers/libqsqlodbc.so ${QT_PLUGIN_PATH}/sqldrivers/libqsqlpsql.so | |
${{github.workspace}}/linuxdeployqt-continuous-x86_64.AppImage | |
QuranCompanion.AppDir/usr/bin/quran-companion | |
-unsupported-allow-new-glibc -qmake=$(which qmake) -no-translations | |
-extra-plugins=sqldrivers,iconengines,imageformats,multimedia,networkinformation,platforms,platformthemes,wayland-decoration-client,wayland-graphics-integration-client,wayland-graphics-integration-server,wayland-shell-integration,xcbglintegrations,egldeviceintegrations | |
-verbose=1 | |
- name: Make AppImage | |
run: > | |
${{github.workspace}}/appimagetool-x86_64.AppImage -n QuranCompanion.AppDir | |
Quran_Companion-${{env.APP_VER}}-x86_64.AppImage | |
md5sum "Quran_Companion-${{env.APP_VER}}-x86_64.AppImage" > "Quran_Companion-${{env.APP_VER}}-x86_64.AppImage.md5" | |
- name: Upload Release | |
uses: ncipollo/release-action@v1.13.0 | |
with: | |
allowUpdates: true | |
name: "v${{env.APP_VER}}" | |
tag: "v${{env.APP_VER}}" | |
bodyFile: CHANGELOG.md | |
artifacts: "Quran_Companion-${{env.APP_VER}}-x86_64.AppImage*" |