-
Notifications
You must be signed in to change notification settings - Fork 11
112 lines (90 loc) · 3.99 KB
/
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
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/[email protected]
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*"