Skip to content

Commit

Permalink
ci: package the installer
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenvukhang committed Jan 31, 2023
1 parent 0e89a0c commit 04e0151
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 28 deletions.
40 changes: 12 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ jobs:
with:
arch: win64_msvc2019_64
version: ${{ matrix.version }}
tools: tools_ifw

- name: Install MSVC 2022
uses: ilammy/msvc-dev-cmd@v1
Expand All @@ -103,44 +104,27 @@ jobs:
-DCMAKE_PREFIX_PATH=${{ env.Qt6_DIR }}
cmake --build build
- name: Use windeployqt to add libraries
- name: Use windeployqt to load libraries
shell: bash
run: |
cd build
mv build/CanvasSync.exe \
deploy/windows/packages/com.nguyenvukhang.canvassync/data
cd deploy/windows/packages/com.nguyenvukhang.canvassync/data
$Qt6_DIR/bin/windeployqt.exe CanvasSync.exe
# collect app
- shell: bash
- name: Package the installer
shell: bash
run: |
ls build
cp build/CanvasSync.exe ${{ env.ASSET }}
cd build
tar -zcvf pack-${{ matrix.os }}.tar.gz *
mv pack-${{ matrix.os }}.tar.gz ..
cd deploy/windows
$IQTA_TOOLS/QtInstallerFramework/4.5/bin/binarycreator.exe \
-c config/config.xml -p packages CanvasSyncInstaller-${{ matrix.os }}.exe
mv CanvasSyncInstaller-${{ matrix.os }}.exe ../..
# upload release package
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ env.ASSET }}
pack-${{ matrix.os }}.tar.gz
CanvasSyncInstaller-${{ matrix.os }}.exe
generate_release_notes: true

test:
strategy:
fail-fast: false
matrix:
include:
- os: windows-2019
- os: windows-2022
runs-on: ${{ matrix.os }}
steps:
- name: Install build dependencies
shell: bash
run: cinst -y ninja ilmerge
- run: ilmerge
if: ${{ always() }}
- run: ilmerge.exe
if: ${{ always() }}
9 changes: 9 additions & 0 deletions deploy/windows/config/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Installer>
<Name>Canvas Sync</Name>
<Version>1.0.0</Version>
<Title>Canvas Sync Installer</Title>
<Publisher>Nguyen Vu Khang</Publisher>
<StartMenuDir>Super App</StartMenuDir>
<TargetDir>@ApplicationsDir@/CanvasSync</TargetDir>
</Installer>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This file will be installed into the target directory....

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<Package>
<DisplayName>Canvas Sync</DisplayName>
<Description>Syncs local folders with folders on canvas.</Description>
<Version>0.1.0-1</Version>
<ReleaseDate>2010-09-21</ReleaseDate>
<Default>true</Default>
</Package>

0 comments on commit 04e0151

Please sign in to comment.