Skip to content

Windows deploy

Windows deploy #38

Workflow file for this run

name: Windows deploy
on: [workflow_dispatch]
env:
BUILD_TYPE: Release # Change build type here.
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
VCPKG_ROOT: '${{ github.workspace }}/vcpkg'
jobs:
build:
runs-on: windows-latest # Change Windows version here.
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: 6.2.4 # Update Qt version here.
aqtversion: '>=0.9.7'
modules: 'qtimageformats'
tools: 'tools_ifw'
- name: Prepare dependencies
shell: cmd
run: |
.\vcpkg\bootstrap-vcpkg.bat -disableMetrics
- name: Build
shell: bash
run: |
cd build
cmake .. -A x64
cmake --build . --config $BUILD_TYPE --target Degate
- name: Prepare binaries
shell: bash
run: |
cd build/out/bin/$BUILD_TYPE
$QT_ROOT_DIR/bin/windeployqt.exe ./
- name: Upload Degate binaries
uses: actions/upload-artifact@v4
with:
name: Degate_binaries_Windows_x64
path: build/out/bin/${{ env.BUILD_TYPE }}/
- name: Prepare installer
shell: cmd
continue-on-error: true # Robocopy exit code 1 on success.
run: |
cd build/out/bin/%BUILD_TYPE%
C:\msys64\usr\bin\wget.exe https://aka.ms/vs/16/release/vc_redist.x64.exe
del ..\..\..\..\etc\installer\packages\Degate\data\.keepme
ROBOCOPY .\ ..\..\..\..\etc\installer\packages\Degate\data /E
- name: Create Degate installer
shell: cmd
# Update the Qt Installer Framework (ifw) version here (by providing the exe download link and changing the exe name/path).
run: |
cd etc/installer
binarycreator.exe --offline-only -c config\config.xml -p packages "Degate_offline_installer_Windows_x64.exe"
binarycreator.exe --online-only -c config\config.xml -p packages "Degate_online_installer_Windows_x64.exe"
- name: Upload Degate offline installer
uses: actions/upload-artifact@v4
with:
name: Degate_offline_installer_Windows_x64
path: etc/installer/Degate_offline_installer_Windows_x64.exe
- name: Upload Degate online installer
uses: actions/upload-artifact@v4
with:
name: Degate_online_installer_Windows_x64
path: etc/installer/Degate_online_installer_Windows_x64.exe
- name: Create Degate update
shell: cmd
run: |
cd etc/installer
repogen.exe -p packages repository
- name: Upload Degate update
uses: actions/upload-artifact@v4
with:
name: Degate_update_Windows_x64
path: etc/installer/repository
- name: Upload vcpkg build logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: 'vcpkg-buildlogs-${{ matrix.triplet }}'
path: ${{ env.VCPKG_ROOT }}/buildtrees/**/*.log