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 f11fe1f
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 4 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,43 @@ jobs:
cmake --build . --target=deploy
cmake --build . --target=pack
working-directory: ${{runner.workspace}}/build

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

- name: Archive Installer
uses: actions/upload-artifact@v2
with:
name: VNote-${{env.VNOTE_VER}}-win-${{matrix.config.platform}}-qt${{matrix.config.qt}}.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/update-release@v1.0.0
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/release-action@v1.11.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
# We need hard code here.
artifacts: "D:/a/vnote/build/VNote*.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 f11fe1f

Please sign in to comment.