Skip to content

Commit 25e33bd

Browse files
committed
Merge remote-tracking branch 'origin/dev'
2 parents 8822924 + 835b434 commit 25e33bd

34 files changed

Lines changed: 1151 additions & 465 deletions

.github/workflows/build-deb-qt5-amd64.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
description: 'Checkout tag'
1414
required: false
1515

16+
permissions:
17+
contents: write
18+
1619
jobs:
1720
build-omodscan:
1821
name: Build OpenModScan deb package version '${{ github.event.inputs.tag || github.event.inputs.branch || github.ref_name }}' with Qt5
@@ -181,6 +184,7 @@ jobs:
181184
- name: Create Debian rules file
182185
run: |
183186
sed -e "s|@QT_LIB_PATH@|${{ env.QT_INSTALL_DIR }}/${{ env.QT_VERSION }}/${{ env.CMAKE_COMPILER }}/lib|g" \
187+
-e "s|@PACKAGE_NAME@|${{ env.DEB_PACKAGE_NAME }}|g" \
184188
${{ env.DEB_SRC_DIR }}/debian/rules.in > ${{ env.DEB_SRC_DIR }}/debian/rules
185189
rm ${{ env.DEB_SRC_DIR }}/debian/rules.in
186190
cat -n ${{ env.DEB_SRC_DIR }}/debian/rules
@@ -198,3 +202,15 @@ jobs:
198202
with:
199203
name: ${{ env.DEB_PACKAGE_NAME }}_${{ env.APP_VERSION }}-${{ env.DEB_REVISION }}_${{ env.DEB_ARCH }}
200204
path: ${{ env.BUILD_DEB_DIR }}/${{ env.DEB_PACKAGE_NAME }}_${{ env.APP_VERSION }}-${{ env.DEB_REVISION }}_${{ env.DEB_ARCH }}.deb
205+
206+
- name: Create or update GitHub Release and upload DEB
207+
if: success() && github.event_name == 'push' && github.ref_type == 'tag'
208+
uses: softprops/action-gh-release@v2
209+
with:
210+
draft: true
211+
tag_name: ${{ github.ref_name }}
212+
name: Open ModScan ${{ env.APP_VERSION }}
213+
files: |
214+
${{ env.BUILD_DEB_DIR }}/${{ env.DEB_PACKAGE_NAME }}_${{ env.APP_VERSION }}-${{ env.DEB_REVISION }}_${{ env.DEB_ARCH }}.deb
215+
env:
216+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build-deb-qt6-amd64.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
description: 'Checkout tag'
1414
required: false
1515

16+
permissions:
17+
contents: write
18+
1619
jobs:
1720
build-omodscan:
1821
name: Build OpenModScan deb package version '${{ github.event.inputs.tag || github.event.inputs.branch || github.ref_name }}' with Qt6
@@ -26,6 +29,7 @@ jobs:
2629
QT_TARGET: "desktop"
2730
QT_ARCH: "linux_gcc_64"
2831
QT_INSTALL_DIR: "/opt/Qt"
32+
QT_QPA_PLATFORM: "xcb"
2933
CMAKE_COMPILER: "gcc_64"
3034
CMAKE_GENERATOR: "Ninja"
3135
BUILD_TYPE: "Release"
@@ -90,8 +94,7 @@ jobs:
9094
- name: Set Python 3.12 as default
9195
run: |
9296
update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.12 2
93-
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
94-
update-alternatives --auto python3
97+
update-alternatives --set python3 /usr/local/bin/python3.12
9598
9699
- name: Upgrade pip
97100
run: |
@@ -157,6 +160,7 @@ jobs:
157160
git clone https://github.com/QuasarApp/CQtDeployer.git
158161
cd CQtDeployer
159162
git checkout v1.6.2365
163+
wget -qO- https://github.com/QuasarApp/CQtDeployer/pull/846.patch | git apply
160164
git submodule update --init --recursive
161165
cmake -B build -DCMAKE_BUILD_TYPE=Release \
162166
-DCMAKE_PREFIX_PATH=${{ env.QT_INSTALL_DIR }}/${{ env.QT_VERSION }}/${{ env.CMAKE_COMPILER }} \
@@ -174,7 +178,8 @@ jobs:
174178
-targetDir ${{ env.DEB_SRC_DIR }}/opt/OpenModScan \
175179
-libDir ${{ env.QT_INSTALL_DIR }}/${{ env.QT_VERSION }}/${{ env.CMAKE_COMPILER }}/lib \
176180
-ignore libcrypto.so.3,libmysqlclient.so.21,libpq.so.5,libssl.so.3,libqsqlmimer.so,libqsqlmysql.so,libqsqlodbc.so,libqsqlpsql.so \
177-
-extraLibs icudata,icui18n,icuuc,libxcb-util
181+
-extraLibs icudata,icui18n,icuuc,libxcb-util \
182+
-customScript 'export QT_QPA_PLATFORM=${{ env.QT_QPA_PLATFORM }}'
178183
179184
- name: Create Debian control file
180185
run: |
@@ -205,6 +210,7 @@ jobs:
205210
- name: Create Debian rules file
206211
run: |
207212
sed -e "s|@QT_LIB_PATH@|${{ env.QT_INSTALL_DIR }}/${{ env.QT_VERSION }}/${{ env.CMAKE_COMPILER }}/lib|g" \
213+
-e "s|@PACKAGE_NAME@|${{ env.DEB_PACKAGE_NAME }}|g" \
208214
${{ env.DEB_SRC_DIR }}/debian/rules.in > ${{ env.DEB_SRC_DIR }}/debian/rules
209215
rm ${{ env.DEB_SRC_DIR }}/debian/rules.in
210216
cat -n ${{ env.DEB_SRC_DIR }}/debian/rules
@@ -222,3 +228,15 @@ jobs:
222228
with:
223229
name: ${{ env.DEB_PACKAGE_NAME }}_${{ env.APP_VERSION }}-${{ env.DEB_REVISION }}_${{ env.DEB_ARCH }}
224230
path: ${{ env.BUILD_DEB_DIR }}/${{ env.DEB_PACKAGE_NAME }}_${{ env.APP_VERSION }}-${{ env.DEB_REVISION }}_${{ env.DEB_ARCH }}.deb
231+
232+
- name: Create or update GitHub Release and upload DEB
233+
if: success() && github.event_name == 'push' && github.ref_type == 'tag'
234+
uses: softprops/action-gh-release@v2
235+
with:
236+
draft: true
237+
tag_name: ${{ github.ref_name }}
238+
name: Open ModScan ${{ env.APP_VERSION }}
239+
files: |
240+
${{ env.BUILD_DEB_DIR }}/${{ env.DEB_PACKAGE_NAME }}_${{ env.APP_VERSION }}-${{ env.DEB_REVISION }}_${{ env.DEB_ARCH }}.deb
241+
env:
242+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build-flatpak-x86_64.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
description: 'Checkout tag'
1515
required: false
1616

17+
permissions:
18+
contents: write
19+
1720
jobs:
1821
flatpak:
1922
name: Flatpak Build
@@ -59,4 +62,16 @@ jobs:
5962
with:
6063
name: io.github.sanny32.omodscan.flatpak
6164
path: |
62-
.flatpak/io.github.sanny32.omodscan.flatpak
65+
.flatpak/io.github.sanny32.omodscan.flatpak
66+
67+
- name: Create or update GitHub Release and upload FLATPAK
68+
if: success() && github.event_name == 'push' && github.ref_type == 'tag'
69+
uses: softprops/action-gh-release@v2
70+
with:
71+
draft: true
72+
tag_name: ${{ github.ref_name }}
73+
name: Open ModScan ${{ env.APP_VERSION }}
74+
files: |
75+
.flatpak/io.github.sanny32.omodscan.flatpak
76+
env:
77+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build-installer-qt5-win32.yml

Lines changed: 104 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,17 @@ on:
99
branch:
1010
description: 'Checkout branch'
1111
required: false
12+
default: dev
1213
tag:
1314
description: 'Checkout tag'
1415
required: false
16+
signing:
17+
description: 'Sign executable and installer'
18+
type: boolean
19+
default: false
20+
21+
permissions:
22+
contents: write
1523

1624
env:
1725
QT_VERSION: 5.15.2
@@ -22,6 +30,11 @@ env:
2230
ARCH: x86
2331
BUILD_TYPE: Release
2432

33+
# SingPath variables
34+
PROJECT_SLUG: OpenModScan
35+
ORGANIZAITION_ID: 2bd9d721-94a7-4c7d-aab8-b81dd84670a5
36+
ARTIFACT_CONF_SLUG: exe-zip
37+
2538
jobs:
2639
build-omodscan:
2740
name: Build OpenModScan installer version '${{ github.event.inputs.tag || github.event.inputs.branch || github.ref_name }}' with Qt5 on Windows x86
@@ -46,6 +59,27 @@ jobs:
4659
)
4760
shell: cmd
4861

62+
- name: Select signing policy
63+
run: |
64+
set SIGNING_POLICY_SLUG=none
65+
if "${{ github.event_name }}"=="push" (
66+
if "${{ github.ref_type }}"=="tag" (
67+
set SIGNING_POLICY_SLUG=release-signing
68+
)
69+
)
70+
if "${{ github.event_name }}"=="workflow_dispatch" (
71+
if "${{ github.event.inputs.signing }}"=="true" (
72+
if not "${{ github.event.inputs.tag }}"=="" (
73+
set SIGNING_POLICY_SLUG=release-signing
74+
) else (
75+
set SIGNING_POLICY_SLUG=test-signing
76+
)
77+
)
78+
)
79+
echo SIGNING_POLICY_SLUG=%SIGNING_POLICY_SLUG%>>%GITHUB_ENV%
80+
echo Selected signing policy: %SIGNING_POLICY_SLUG%
81+
shell: cmd
82+
4983
- name: Install Python (for aqtinstall)
5084
uses: actions/setup-python@v5
5185
with:
@@ -70,6 +104,13 @@ jobs:
70104
with:
71105
vs-version: '16.11'
72106

107+
- name: Get Visual Studio path
108+
run: |
109+
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" ^
110+
-latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do set VS_PATH=%%i
111+
echo VS_PATH=%VS_PATH%>>%GITHUB_ENV%
112+
shell: cmd
113+
73114
- name: Configure CMake
74115
run: |
75116
cmake omodscan -B ${{ env.BUILD_DIR }} -G "${{ env.CMAKE_GENERATOR }}" -A ${{ env.CMAKE_ARCH }} -T v142 -DCMAKE_PREFIX_PATH="C:/Qt/${{ env.QT_VERSION }}/${{ env.CMAKE_COMPILER }}"
@@ -80,12 +121,34 @@ jobs:
80121
cmake --build ${{ env.BUILD_DIR }} --config ${{ env.BUILD_TYPE }} --parallel
81122
shell: cmd
82123

83-
- name: Get Visual Studio path
84-
run: |
85-
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" ^
86-
-latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do set VS_PATH=%%i
87-
echo VS_PATH=%VS_PATH%>>%GITHUB_ENV%
88-
shell: cmd
124+
- name: Upload Executable
125+
id: upload-exe
126+
uses: actions/upload-artifact@v4
127+
if: success()
128+
with:
129+
name: omodscan.exe
130+
path: ${{ env.BUILD_DIR }}\${{ env.BUILD_TYPE }}\omodscan.exe
131+
132+
- name: Signing Executable
133+
uses: signpath/github-action-submit-signing-request@v1
134+
if: success() && env.SIGNING_POLICY_SLUG != 'none'
135+
with:
136+
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
137+
organization-id: '${{ env.ORGANIZAITION_ID }}'
138+
project-slug: '${{ env.PROJECT_SLUG }}'
139+
signing-policy-slug: ${{ env.SIGNING_POLICY_SLUG }}
140+
artifact-configuration-slug: ${{ env.ARTIFACT_CONF_SLUG }}
141+
github-artifact-id: '${{steps.upload-exe.outputs.artifact-id}}'
142+
output-artifact-directory: ${{ env.BUILD_DIR }}\${{ env.BUILD_TYPE }}
143+
wait-for-completion: true
144+
wait-for-completion-timeout-in-seconds: 3600
145+
146+
- name: Upload signed Executable
147+
uses: actions/upload-artifact@v4
148+
if: success() && env.SIGNING_POLICY_SLUG != 'none'
149+
with:
150+
name: omodscan-signed.exe
151+
path: ${{ env.BUILD_DIR }}\${{ env.BUILD_TYPE }}\omodscan.exe
89152

90153
- name: Deploy Qt dependencies using windeployqt
91154
run: |
@@ -115,8 +178,42 @@ jobs:
115178
shell: cmd
116179

117180
- name: Upload Installer
181+
id: upload-installer
118182
uses: actions/upload-artifact@v4
119183
if: success()
120184
with:
121185
name: qt5-omodscan-${{ env.APP_VERSION }}_${{ env.ARCH }}
122-
path: qt5-omodscan-${{ env.APP_VERSION }}_${{ env.ARCH }}.exe
186+
path: qt5-omodscan-${{ env.APP_VERSION }}_${{ env.ARCH }}.exe
187+
188+
- name: Signing Installer
189+
uses: signpath/github-action-submit-signing-request@v1
190+
if: success() && env.SIGNING_POLICY_SLUG != 'none'
191+
with:
192+
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
193+
organization-id: '${{ env.ORGANIZAITION_ID }}'
194+
project-slug: '${{ env.PROJECT_SLUG }}'
195+
signing-policy-slug: ${{ env.SIGNING_POLICY_SLUG }}
196+
artifact-configuration-slug: ${{ env.ARTIFACT_CONF_SLUG }}
197+
github-artifact-id: '${{steps.upload-installer.outputs.artifact-id}}'
198+
output-artifact-directory: .
199+
wait-for-completion: true
200+
wait-for-completion-timeout-in-seconds: 3600
201+
202+
- name: Upload signed Installer
203+
uses: actions/upload-artifact@v4
204+
if: success() && env.SIGNING_POLICY_SLUG != 'none'
205+
with:
206+
name: qt5-omodscan-${{ env.APP_VERSION }}_${{ env.ARCH }}-signed
207+
path: qt5-omodscan-${{ env.APP_VERSION }}_${{ env.ARCH }}.exe
208+
209+
- name: Create or update GitHub Release and upload EXE
210+
if: success() && github.event_name == 'push' && github.ref_type == 'tag'
211+
uses: softprops/action-gh-release@v2
212+
with:
213+
draft: true
214+
tag_name: ${{ github.ref_name }}
215+
name: Open ModScan ${{ env.APP_VERSION }}
216+
files: |
217+
qt5-omodscan-${{ env.APP_VERSION }}_${{ env.ARCH }}.exe
218+
env:
219+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)