cubiomes-viewer/.github/workflows/windows-release.yaml

62 lines
1.5 KiB
YAML
Raw Normal View History

name: Windows Release
on:
push:
branches:
- 'trunk'
tags:
- 'v*'
2024-01-29 04:11:38 +08:00
defaults:
run:
shell: cmd
env:
PROG: cubiomes-viewer
SOURCE_DIR: ${{github.workspace}}
jobs:
build:
runs-on: windows-2019
steps:
2024-01-29 04:16:57 +08:00
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
2024-01-29 04:16:57 +08:00
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
version: '5.15.2'
host: 'windows'
target: 'desktop'
arch: 'win64_mingw81'
archives: 'x86_64 qtbase qttools'
cache: true
setup-python: false
2024-01-29 04:16:57 +08:00
- name: Build
working-directory: ${{env.SOURCE_DIR}}
run: |
qmake CONFIG+=release ${{env.SOURCE_DIR}}
mingw32-make
2024-01-29 04:16:57 +08:00
- name: Deploy
working-directory: ${{env.SOURCE_DIR}}
run: |
mkdir ${{env.PROG}}
copy ${{env.SOURCE_DIR}}\release\${{env.PROG}}.exe ${{env.PROG}}
windeployqt --dir ${{env.PROG}} ${{env.SOURCE_DIR}}\release\${{env.PROG}}.exe --compiler-runtime --no-translations --no-system-d3d-compiler --no-opengl-sw --no-angle
2024-01-29 06:47:28 +08:00
${{env.SOURCE_DIR}}\${{env.PROG}}\${{env.PROG}}.exe --version
2024-01-29 04:16:57 +08:00
- name: Save build artifact
uses: actions/upload-artifact@v4
with:
name: ${{env.PROG}}-win
path: ${{env.SOURCE_DIR}}\${{env.PROG}}