Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tamlok committed May 2, 2024
1 parent 671da92 commit a0e0657
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 9 deletions.
57 changes: 52 additions & 5 deletions .github/workflows/ci-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@ jobs:
- {
name: "Build On Win64 Qt 5.15",
arch: win64_msvc2019_64,
platform: x64,
qt: 5.15.2,
qt_modules: qtwebengine,
qt_tools: tools_opensslv3_x64,
qt_major: 5
qt_major: 5,
suffix: "-windows7"
}
- {
name: "Build On Win64 Qt 6.5",
arch: win64_msvc2019_64,
platform: x64,
qt: 6.5.2,
qt_modules: "qtwebengine qtwebchannel qtpositioning qtpdf qtimageformats qt5compat",
qt_tools: tools_opensslv3_x64,
qt_major: 6
qt_major: 6,
suffix: ""
}

steps:
Expand Down Expand Up @@ -100,9 +100,56 @@ jobs:
tree
qmake --version
cmake --version
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{matrix.config.platform}}
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_DEFAULT_MAJOR_VERSION=${{matrix.config.qt_major}} %GITHUB_WORKSPACE%
cmake --build .
cmake --build . --target=deploy
cmake --build . --target=pack
working-directory: ${{runner.workspace}}/build

- name: Rename on 5.15
shell: bash
if: ${{startsWith(matrix.config.qt, '5.15')}}
run: |
mv VNote*.zip VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.zip
working-directory: ${{runner.workspace}}/build

- name: Archive Artifacts
uses: actions/upload-artifact@v2
with:
name: VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.zip
path: ${{env.workspace}}/build/VNote*.zip

- name: Archive Installer
uses: actions/upload-artifact@v2
with:
name: VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.msi
path: ${{runner.workspace}}/build/VNote*.msi

- name: Update Tag
if: github.ref == 'refs/heads/master'
shell: bash
run: |
git tag --force continuous-build ${GITHUB_SHA}
git push --force --tags
- name: Update Continuous Build Release
if: github.ref == 'refs/heads/master' && ${{!startsWith(matrix.config.qt, '5.15')}}
uses: johnwbyrd/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: ${{runner.workspace}}/build/VNote*.zip
release: Continuous Build
tag: continuous-build

- name: Release
if: github.ref == 'refs/heads/master' && startsWith(github.event.head_commit.message, '[Release]')
uses: ncipollo/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
# We need hard code here.
artifacts: "D:/a/vnote/build/VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.zip"
commit: master
tag: v${{env.VNOTE_VER}}
allowUpdates: true
draft: true
10 changes: 6 additions & 4 deletions src/Packaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ function(windeployqt target)
# Bundle Library Files
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER)

if(CMAKE_BUILD_TYPE_UPPER STREQUAL "DEBUG")
set(WINDEPLOYQT_ARGS --debug)
else()
set(WINDEPLOYQT_ARGS --release)
if ((QT_DEFAULT_MAJOR_VERSION GREATER 5))
if(CMAKE_BUILD_TYPE_UPPER STREQUAL "DEBUG")
set(WINDEPLOYQT_ARGS --debug)
else()
set(WINDEPLOYQT_ARGS --release)
endif()
endif()

add_custom_target(deploy
Expand Down

0 comments on commit a0e0657

Please sign in to comment.