Skip to content

Don't bother with OBS workflow after all #515

Don't bother with OBS workflow after all

Don't bother with OBS workflow after all #515

Workflow file for this run

name: Windows build
on:
push:
workflow_dispatch:
inputs:
packageRelease:
description: 'Package binaries for release and upload them'
required: false
default: false
jobs:
windows:
name: Windows desktop (Qt ${{ matrix.qt-version }})
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
qt-version: ['6.2', '6.4']
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '${{ matrix.qt-version }}.*'
cache: true
modules: 'qtnetworkauth'
- name: Install Qt IFW
if: ${{ github.event.inputs.packageRelease || startsWith(github.ref, 'refs/tags/v') }}
uses: jmarrec/setup-qtifw@v1
with:
qtifw-version: '4.x'
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Build
env:
CREATE_RELEASE_PACKAGE: ${{ (github.event.inputs.packageRelease || startsWith(github.ref, 'refs/tags/v')) && '-DGENERATE_INSTALLER=ON' || '-DGENERATE_INSTALLER=OFF' }}
CMAKE_TARGETS: ${{ (github.event.inputs.packageRelease || startsWith(github.ref, 'refs/tags/v')) && '--target package' || '--target ALL_BUILD' }}
run: |
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo $env:CREATE_RELEASE_PACKAGE ..
cmake --build . --config RelWithDebInfo $env:CMAKE_TARGETS
cd ..
- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: Windows binary (Qt ${{ matrix.qt-version }})
path: build\RelWithDebInfo\TimeLight.exe
retention-days: 7
- name: Upload release package
if: ${{ github.event.inputs.packageRelease || startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v2
with:
name: Windows package (64-bit, Qt ${{ matrix.qt-version }})
path: build\TimeLight-*-win*.exe
retention-days: 7