Skip to content

Color Switch

Color Switch #8

Workflow file for this run

name: Windows Build
on:
push:
branches:
- main
- cicd
env:
QT_VERSION: 6.5.0
AQT_PLATFORM: msvc2019_64
ARCHIVE_NAME: OpenSprite-win-amd64-latest
jobs:
build:
permissions:
contents: write
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install MSVC
uses: aminya/setup-cpp@v1
with:
compiler: msvc
vcvarsall: true
- name: Download aqtinstall
run: |
Write-Host 'Downloading aqtinstall ...'
$src = 'https://github.com/miurahr/aqtinstall/releases/download/v3.1.6/aqt_x64_signed.exe'
$target = 'C:\Windows\System32\aqt.exe'
Invoke-WebRequest -Uri $src -OutFile $target
- name: Install Qt
run: |
Write-Host 'Installing Qt ...'
#aqt list-qt windows desktop --arch $Env:QT_VERSION
aqt install-qt windows desktop $Env:QT_VERSION "win64_${Env:AQT_PLATFORM}" -O C:\Qt
- name: Run qmake
run: |
Write-Host 'Running qmake ...'
$Env:PATH = "C:\Qt\${Env:QT_VERSION}\${Env:AQT_PLATFORM}\bin;${Env:PATH}"
# Generate MSBuild VC++ project
qmake -Wall -tp vc OpenSprite.pro
- name: Build
run: |
msbuild OpenSprite.vcxproj -property:Configuration=Release
- name: Provision runtime environment
run: |
$src = "C:\Qt\${Env:QT_VERSION}\${Env:AQT_PLATFORM}\bin"
$windeployqt = Join-Path $src windeployqt.exe
& "$windeployqt" --release --no-translations (Join-Path $pwd build\release)
- name: List artifacts
run: |
Get-ChildItem . -Recurse
- name: Upload executable artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARCHIVE_NAME }}
path: |
build/release/*
- name: ZIP executable artifacts
run: |
7z a -r "${Env:ARCHIVE_NAME}.zip" .\build\release\*
- name: Publish release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Automatic Build"
files: |
${{ env.ARCHIVE_NAME }}.zip