Skip to content

Set version to 0.5.1 #284

Set version to 0.5.1

Set version to 0.5.1 #284

Workflow file for this run

name: Windows build
on:
push:
branches: '*'
tags: '*'
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
qt-version: ['6.8']
qt-target: ['desktop']
qt-modules: ['']
mingw-version: ['11.2.0']
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: Setup environment
run: |
sed -i -e '/^#/d' .github/config.env
sed -i -e '/^$/d' .github/config.env
cat .github/config.env >> "${GITHUB_ENV}"
shell: bash
- name: Get version
run: |
version=$(LC_ALL=en_US.utf8 grep -oP 'project\([^)]*\s+VERSION\s+\K[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt)
echo "Project version: $version"
echo previous_tag=$version >> "${GITHUB_ENV}"
shell: bash
## Install Qt
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt-version }}
host: 'windows'
arch: 'win64_mingw'
target: ${{ matrix.qt-target }}
modules: ${{ matrix.qt-modules }}
- name: Install Qt IFW
run: |
curl -o aqt.exe -L https://github.com/miurahr/aqtinstall/releases/download/v2.2.1/aqt.exe
./aqt.exe install-tool windows desktop tools_ifw
mv Tools ..
echo ${pwd}/../Tools/QtInstallerFramework/*/bin >> "${GITHUB_PATH}"
shell: bash
- name: Install MinGW
uses: egor-tensin/setup-mingw@v2
with:
platform: x64
static: 0
version: ${{ matrix.mingw-version }}
## Build
- name: Windows build
run: .ci/common/build.sh win_build win64
shell: bash
- name: Deploy
run: |
mkdir win_release
for /r win_build %%f in (${{ env.executable_name }}.exe) do @move "%%f" win_release
for /r win_build %%f in (*.dll) do @move "%%f" win_release
cd win_release
windeployqt ${{ env.executable_name }}.exe --qmldir ..\win_build\src || exit 5
shell: cmd
- name: Copy libraries
run: |
cp ${QT_ROOT_DIR}/bin/libgcc_s_seh-1.dll win_release/
cp ${QT_ROOT_DIR}/bin/libstdc++-6.dll win_release/
cp ${QT_ROOT_DIR}/bin/libwinpthread-1.dll win_release/
shell: bash
## Upload
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: build-Qt-${{ matrix.qt-version }}
path: win_release/
## Build installer
- if: env.create_windows_installer == 1
name: Disable repository update
run: echo "update_windows_repository=0" >> "${GITHUB_ENV}"
shell: bash
- if: env.create_windows_installer == 1
name: Get installer repository
uses: actions/checkout@v4
with:
repository: ${{ env.installer_repo_github }}/${{ env.installer_repo_name }}
fetch-depth: 0
path: win_repo
token: ${{ secrets.PUSH_TOKEN }}
- if: env.create_windows_installer == 1
name: Build installer
run: .ci/windows_installer.sh "${GITHUB_WORKSPACE}/win_repo"
shell: bash
# Upload installer
- name: Upload installer
uses: actions/upload-artifact@v3
with:
name: installer-Qt-${{ matrix.qt-version }}
path: '*installer.exe'