Skip to content

Merge pull request #65 from prnake/fix_flatpak #17

Merge pull request #65 from prnake/fix_flatpak

Merge pull request #65 from prnake/fix_flatpak #17

Workflow file for this run

name: Windows
on:
push:
branches:
- master
tags:
- '*'
pull_request:
branches:
- master
workflow_dispatch:
env:
targetName: danmaQ
jobs:
build:
name: Build
runs-on: windows-latest
strategy:
matrix:
include:
- qt_ver: 6.8.2
qt_arch: win64_msvc2022_64
msvc_arch: x64
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt_ver }}
modules: "qtwebengine qtwebchannel qtpositioning" # latter two are required by webengine
arch: ${{ matrix.qt_arch }}
cache: true
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: MSVC Build
id: build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.msvc_arch }}
cmake -B build -DCMAKE_INSTALL_PREFIX=/app -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DQT_DEBUG_FIND_PACKAGE=ON
cmake --build build
- name: Package Qt
env:
VCINSTALLDIR: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC'
shell: pwsh
run: |
New-Item -ItemType Directory ${env:targetName}
Copy-Item build\src\Debug\${{ env.targetName }}.exe ${env:targetName}\
windeployqt ${env:targetName}\${env:targetName}.exe
Compress-Archive -Path ${env:targetName} ${env:targetName}'.zip'
- uses: actions/upload-artifact@v4
with:
name: ${{ env.targetName }}.win.${{ matrix.msvc_arch }}.zip
path: ${{ env.targetName }}.zip
- name: Update to release
if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.targetName }}.zip
asset_name: ${{ env.targetName }}.win.${{ matrix.msvc_arch }}.zip
tag: ${{ github.ref }}
overwrite: true