Skip to content

Update WindowsRelease.yml #8

Update WindowsRelease.yml

Update WindowsRelease.yml #8

name: Windows Release
on:
push:
branches:
- master
tags-ignore:
- '*'
env:
QT5_VERSION: "5.15.2"
MINGW5_VERSION: "win32_mingw81"
MINGW5_PATH: "mingw81_32"
QT6_VERSION: "6.6.2"
MINGW6_VERSION: "win64_mingw"
MINGW6_PATH: "mingw_64"
BUILD_TYPE: Release
jobs:
WindowsRelease:
runs-on: windows-latest
steps:
-
uses: actions/checkout@v4
with:
path: SiriKali
-
name: Install mingw
uses: msys2/setup-msys2@v2
with:
install: mingw-w64-i686-gcc
msystem: mingw32
location: ${{github.workspace}}
-
name: update env for Qt5
run: echo "${{github.workspace}}/msys64/mingw32/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
-
name: Check GCC version and path for Qt5
run: |
Write-Output (Get-Command c++.exe).Path
c++.exe --version
-
name: Install Qt5
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT5_VERSION }}
arch: ${{ env.MINGW5_VERSION }}
dir: "${{github.workspace}}/qt5"
install-deps: "true"
host: 'windows'
target: 'desktop'
-
name: Configure CMake for Qt5
env:
CMAKE_PREFIX_PATH: "${{github.workspace}}/qt5/Qt/${{ env.QT5_VERSION }}"
msystem: MINGW32
run: cmake -DOUTPUT_BASE_NAME=SiriKaliQt5 -DBUILD_WITH_QT6=false -DOUTPUT_PATH=${{github.workspace}}\ -DSOURCE_PATH=${{github.workspace}}\SiriKali\ -DCMAKE_VERBOSE_MAKEFILE=FALSE -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -G "CodeBlocks - MinGW Makefiles" -S ${{github.workspace}}/SiriKali/ -B ${{github.workspace}}/SiriKali/build5
-
name: Prepare Release Version
run: |
$data = [System.IO.File]::ReadAllText("${{github.workspace}}\SiriKali\build5\VERSION_INFO")
echo "RELEASEVERSION=$data" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
-
name: Reconfigure CMake for Qt5
env:
CMAKE_PREFIX_PATH: "${{github.workspace}}/qt5/Qt/${{ env.QT5_VERSION }}"
msystem: MINGW32
run: cmake -DOUTPUT_BASE_NAME=SiriKaliQt5 -DLIBRARIES_LOCATION=${{github.workspace}}\SiriKaliQt5-${{ env.RELEASEVERSION }} -DBUILD_WITH_QT6=false -DOUTPUT_PATH=${{github.workspace}}\ -DSOURCE_PATH=${{github.workspace}}\SiriKali\ -DCMAKE_VERBOSE_MAKEFILE=FALSE -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -G "CodeBlocks - MinGW Makefiles" -S ${{github.workspace}}/SiriKali/ -B ${{github.workspace}}/SiriKali/build5
-
name: Print installer script for Qt5
run : get-content ${{github.workspace}}\SiriKali\build5\sirikali_windows_installer_Qt5.iss
-
name: Build Project for Qt5
run: cmake --build ${{github.workspace}}/SiriKali/build5
-
name: Create SiriKaliQt5.zip
run: |
New-Item -ItemType Directory -Path ${{github.workspace}}\SiriKaliQt5-${{ env.RELEASEVERSION }}
New-Item -ItemType Directory -Path ${{github.workspace}}\SiriKaliQt5-${{ env.RELEASEVERSION }}\local
Copy-Item -Path ${{github.workspace}}\SiriKali\translations -Destination ${{github.workspace}}\SiriKaliQt5-${{ env.RELEASEVERSION }} -Recurse
Copy-Item -Path ${{github.workspace}}\SiriKali\build5\sirikali.exe -Destination ${{github.workspace}}\SiriKaliQt5-${{ env.RELEASEVERSION }}
Set-Location ${{github.workspace}}\SiriKaliQt5-${{ env.RELEASEVERSION }}
${{github.workspace}}/qt5/Qt/${{ env.QT5_VERSION }}/${{ env.MINGW5_PATH }}/bin/windeployqt.exe ${{github.workspace}}\SiriKaliQt5-${{ env.RELEASEVERSION }}\sirikali.exe
echo ${{ env.RELEASEVERSION }} | Out-File -FilePath ${{github.workspace}}\SiriKaliQt5-${{ env.RELEASEVERSION }}\version_info.txt -Encoding utf8 -Append
Compress-Archive -Path ${{github.workspace}}\SiriKaliQt5-${{ env.RELEASEVERSION }} -DestinationPath ${{github.workspace}}\SiriKaliQt5-${{ env.RELEASEVERSION }}.zip
Remove-Item -Path ${{github.workspace}}\SiriKaliQt5-${{ env.RELEASEVERSION }}\local
-
name: Make installer for Qt5
uses: Minionguyjpro/[email protected]
with:
path: SiriKali/build5/sirikali_windows_installer_Qt5.iss
-
name: Install Qt6
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT6_VERSION }}
arch: ${{ env.MINGW6_VERSION }}
dir: "${{github.workspace}}/qt6"
install-deps: "true"
host: 'windows'
target: 'desktop'
tools: 'tools_mingw1310'
-
name: update env for Qt6
run: echo "${{github.workspace}}/qt6/Qt/Tools/mingw1310_64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
-
name: Check GCC version and path for Qt6
run: |
Write-Output (Get-Command c++.exe).Path
c++.exe --version
-
name: Configure CMake for Qt6
env:
CMAKE_PREFIX_PATH: "${{github.workspace}}/qt6/Qt/${{ env.QT6_VERSION }}"
msystem: MINGW32
run: cmake -DOUTPUT_BASE_NAME=SiriKaliQt6 -DLIBRARIES_LOCATION=${{github.workspace}}\SiriKaliQt6-${{ env.RELEASEVERSION }} -DOUTPUT_PATH=${{github.workspace}}\ -DSOURCE_PATH=${{github.workspace}}\SiriKali\ -DBUILD_WITH_QT6=true -DCMAKE_VERBOSE_MAKEFILE=FALSE -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -G "CodeBlocks - MinGW Makefiles" -S ${{github.workspace}}/SiriKali/ -B ${{github.workspace}}/SiriKali/build6
-
name: Print installer script for Qt6
run : get-content ${{github.workspace}}\SiriKali\build6\sirikali_windows_installer_Qt6.iss
-
name: Build Project for Qt6
run: cmake --build ${{github.workspace}}/SiriKali/build6
-
name: Create SiriKaliQt6.zip
run: |
New-Item -ItemType Directory -Path ${{github.workspace}}\SiriKaliQt6-${{ env.RELEASEVERSION }}
New-Item -ItemType Directory -Path ${{github.workspace}}\SiriKaliQt6-${{ env.RELEASEVERSION }}\ocal
Copy-Item -Path ${{github.workspace}}\SiriKali\translations -Destination ${{github.workspace}}\SiriKaliQt6-${{ env.RELEASEVERSION }} -Recurse
Copy-Item -Path ${{github.workspace}}\SiriKali\build6\sirikali.exe -Destination ${{github.workspace}}\SiriKaliQt6-${{ env.RELEASEVERSION }}
Set-Location ${{github.workspace}}\SiriKaliQt6-${{ env.RELEASEVERSION }}
${{github.workspace}}/qt6/Qt/${{ env.QT6_VERSION }}/${{ env.MINGW6_PATH }}/bin/windeployqt6.exe ${{github.workspace}}\SiriKaliQt6-${{ env.RELEASEVERSION }}\sirikali.exe
echo ${{ env.RELEASEVERSION }} | Out-File -FilePath ${{github.workspace}}\SiriKaliQt6-${{ env.RELEASEVERSION }}\version_info.txt -Encoding utf8 -Append
Compress-Archive -Path ${{github.workspace}}\SiriKaliQt6-${{ env.RELEASEVERSION }} -DestinationPath ${{github.workspace}}\SiriKaliQt6-${{ env.RELEASEVERSION }}.zip
Remove-Item -Path ${{github.workspace}}\SiriKaliQt6-${{ env.RELEASEVERSION }}\local
-
name: Make installer for Qt6
uses: Minionguyjpro/[email protected]
with:
path: SiriKali/build6/sirikali_windows_installer_Qt6.iss
-
name: Rename installers
run: |
Rename-Item -Path ${{github.workspace}}\SiriKaliQt5.exe -NewName ${{github.workspace}}\SiriKaliQt5-${{ env.RELEASEVERSION }}.setup.exe
Rename-Item -Path ${{github.workspace}}\SiriKaliQt6.exe -NewName ${{github.workspace}}\SiriKaliQt6-${{ env.RELEASEVERSION }}.setup.exe
-
name: Post Releases
uses: ncipollo/release-action@v1
with:
artifacts: ${{github.workspace}}\SiriKaliQt5-${{ env.RELEASEVERSION }}.setup.exe,${{github.workspace}}\SiriKaliQt6-${{ env.RELEASEVERSION }}.setup.exe,${{github.workspace}}\SiriKaliQt6-${{ env.RELEASEVERSION }}.zip,${{github.workspace}}\SiriKaliQt5-${{ env.RELEASEVERSION }}.zip
tag: "1.5.2"
commit: "master"
allowUpdates: true
omitBody: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true