Skip to content

windows test

windows test #14

name: Windows Release
on:
push:
branches:
- main
- ci-fix
tags:
- "v*.*.*"
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
arch: "win64_msvc2019_64"
- name: Configure CMake
run: cmake -G "MinGW Makefiles" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Pack Resources
if: startsWith(github.ref, 'refs/tags/v')
run: |
mkdir ${{github.workspace}}\release
Xcopy ${{github.workspace}}\build\TDGame.exe ${{github.workspace}}\release
Xcopy /E /I ${{github.workspace}}\resource\maps ${{github.workspace}}\release\maps
cd ${{env.Qt5_Dir}}\bin\
.\windeployqt.exe ${{github.workspace}}\release\TDGame.exe
- name: Archive Release
uses: thedoctor0/zip-release@0.7.5
if: startsWith(github.ref, 'refs/tags/v')
with:
type: "zip"
directory: ${{github.workspace}}/release/
filename: "TDGame-Windows-${{github.ref_name}}.zip"
- name: Upload Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/v')
with:
files: "${{github.workspace}}/release/TDGame-windows-${{github.ref_name}}.zip"