44 # push代码时触发workflow
55 push :
66 paths-ignore : # 下列文件的变更不触发部署,可以自行添加
7+ - ' .github/workflows/clean_cache.yml'
8+ - ' .github/workflows/delete_workflow.yml'
9+ - ' .github/workflows/qmake.yml'
10+ - ' .github/workflows/readme.yml'
11+ - ' .github/workflows/toolchain.yml'
712 - ' doc/**'
813 - ' .clang-*'
914 - ' .gitignore'
1015 - ' LICENSE'
1116 - ' README*'
1217 pull_request :
1318 paths-ignore : # 下列文件的变更不触发部署,可以自行添加
19+ - ' .github/workflows/clean_cache.yml'
20+ - ' .github/workflows/delete_workflow.yml'
21+ - ' .github/workflows/qmake.yml'
22+ - ' .github/workflows/readme.yml'
23+ - ' .github/workflows/toolchain.yml'
1424 - ' doc/**'
1525 - ' .clang-*'
1626 - ' .gitignore'
@@ -29,23 +39,26 @@ jobs:
2939 - macos-latest
3040 - ubuntu-latest
3141 qt_ver :
32- - 6.5.2
42+ - 6.6.1
3343 build_type :
3444 - " RelWithDebInfo"
3545 generators :
3646 - " Ninja"
3747
3848 steps :
39- - name : cache vcpkg
40- uses : actions/cache@v3
41- with :
42- path : |
43- C:\vcpkg\installed
44- /usr/local/share/vcpkg/installed
45- key : ${{ runner.os }}-vcpkg-installed-${{ matrix.os }}-${{ github.sha }}
46- restore-keys : |
47- ${{ runner.os }}-vcpkg-installed-${{ matrix.os }}-
48- ${{ runner.os }}-vcpkg-installed-
49+ - name : Restore windows vcpkg
50+ if : startsWith(matrix.os, 'windows')
51+ uses : actions/cache/restore@v3
52+ with :
53+ path : C:\vcpkg\installed
54+ key : ${{ runner.os }}-vcpkg-installed-${{ matrix.os }}
55+ - name : Restore macos or ubuntu vcpkg
56+ if : startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
57+ uses : actions/cache/restore@v3
58+ with :
59+ path : /usr/local/share/vcpkg/installed
60+ key : ${{ runner.os }}-vcpkg-installed-${{ matrix.os }}
61+
4962 - name : Install dependencies on windows
5063 if : startsWith(matrix.os, 'windows')
5164 shell : bash
@@ -79,10 +92,10 @@ jobs:
7992 with :
8093 version : ${{ matrix.qt_ver }}
8194 install-deps : ' true'
82- modules : ' qt5compat addons. qtserialport addons. qtnetworkauth addons. qtmultimedia addons. qtimageformats'
95+ modules : ' qt5compat qtserialport qtnetworkauth qtmultimedia qtimageformats'
8396 cache : ' true'
8497
85- - uses : actions/checkout@v3
98+ - uses : actions/checkout@v4
8699 with :
87100 fetch-depth : 1
88101
@@ -180,16 +193,16 @@ jobs:
180193 rm -f ./bin-64/${{ matrix.build_type }}/*.so
181194 mv *.AppImage ./bin-64/${{ matrix.build_type }}
182195
183- - name : Show Upload files
196+ - name : 7z package
184197 shell : bash
185198 run : |
186- ls -l ./bin-64/${{ matrix.build_type }}
199+ ls -al ./bin-64/${{ matrix.build_type }}
200+ 7z a -t7z -r -mx=9 -mmt Qt-App-${{ matrix.os }}-${{ matrix.build_type }}.7z ./bin-64/${{ matrix.build_type }}/*
187201 - name : Upload packages
188202 uses : actions/upload-artifact@v3
189203 with :
190204 name : ${{ matrix.os }}-${{ matrix.build_type }}
191- path : |
192- ./bin-64/${{ matrix.build_type }}
205+ path : Qt-App-${{ matrix.os }}-${{ matrix.build_type }}.7z
193206
194207 release :
195208 name : Release
@@ -201,14 +214,15 @@ jobs:
201214 steps :
202215 - name : Download packages
203216 uses : actions/download-artifact@v3
204- - name : Zip packages
217+
218+ - name : Move packages
205219 shell : bash
206220 run : |
207- ls -l
208- zip -9 -r Qt-App-Windows.zip windows-latest-RelWithDebInfo
209- zip -9 -r Qt-App-MacOS.zip macos-latest-RelWithDebInfo
210- zip -9 -r Qt-App-Ubuntu.zip ubuntu-latest-RelWithDebInfo
211- ls -l
221+ ls -al
222+ mv ./windows-latest-RelWithDebInfo/ Qt-App-*.7z .
223+ mv ./macos-latest-RelWithDebInfo/ Qt-App-*.7z .
224+ mv ./ubuntu-latest-RelWithDebInfo/ Qt-App-*.7z .
225+ ls -al
212226
213227 - name : Create Release
214228 uses : softprops/action-gh-release@v1
@@ -217,4 +231,4 @@ jobs:
217231 prerelease : false
218232 generate_release_notes : true
219233 files : |
220- *.zip
234+ *.7z
0 commit comments