v0.0.4 #69
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" | |
pull_request: | |
branches: | |
- main | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
qt: | |
- version: 6.5.3 | |
modules: qtwebengine qtwebchannel qtpositioning | |
steps: | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{ matrix.qt.version }} | |
modules: ${{ matrix.qt.modules }} | |
# arch: ${{ matrix.qt_arch }} | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
# - name: Set up Qt environment | |
# shell: powershell | |
# run: | | |
# $QtVersion = "${{ matrix.qt.version }}" | |
# $QtBaseDir = "${{ github.workspace }}\..\Qt\$QtVersion" | |
# $QtArch = Get-ChildItem -Path $QtBaseDir -Directory | Where-Object { $_.Name -like 'msvc*' } | Select-Object -ExpandProperty Name | |
# $QtInstallDir = "${{ github.workspace }}\..\Qt\$QtVersion\$QtArch\lib\cmake" | |
# # $QtInstallDir = (Get-ChildItem -Path "${{ github.workspace }}\..\Qt\$QtVersion\" | Where-Object { $_.PSIsContainer -and $_.Name -match 'msvc.*' } | Select-Object -ExpandProperty FullName) + '\lib\cmake' | |
# $CMakeBuildType = "Release" | |
# Write-Output "QT_VERSION=$QtVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
# Write-Output "CMAKE_PREFIX_PATH=$QtInstallDir" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
# Write-Output "CMAKE_BUILD_TYPE=$CMakeBuildType" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Build Msvc | |
shell: powershell | |
env: | |
QT_VERSION: ${{ matrix.qt.version }} | |
CMAKE_PREFIX_PATH: ${{ env.Qt6_DIR }}\lib\cmake | |
CMAKE_BUILD_TYPE: Release | |
run: | | |
# Get-ChildItem -Path "${{ github.workspace }}\.." | |
# Get-ChildItem -Path "$QtBaseDir" | |
# Get-ChildItem -Path "$QtInstallDir" | |
# Get-ChildItem | |
mkdir build | |
cd build | |
cmake .. | |
Get-ChildItem | |
cmake --build . --config ${env:CMAKE_BUILD_TYPE} | |
Get-ChildItem | |
cd .. | |
Get-ChildItem build | |
- name: Package Application | |
shell: powershell | |
env: | |
QT_VERSION: ${{ matrix.qt.version }} | |
CMAKE_PREFIX_PATH: ${{ env.Qt6_DIR }}\lib\cmake | |
CMAKE_BUILD_TYPE: Release | |
run: | | |
cd build | |
$os = "${{ matrix.os }}" -replace "-latest", "" | |
$repositoryName = "${{ github.repository }}" -replace ".*/", "" | |
$zipfile = "${repositoryName}-${os}-${{ matrix.arch }}-${{ github.run_number }}.zip" | |
windeployqt ${env:CMAKE_BUILD_TYPE}\${repositoryName}.exe | |
Compress-Archive -Path "${env:CMAKE_BUILD_TYPE}" -DestinationPath "${zipfile}" | |
# New-Item -ItemType Directory -Path "../target" | |
# Move-Item "${zipfile}" "../target" | |
cd .. | |
Get-ChildItem | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: build/*.zip |