Update windows.yml #69
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Compile and Deploy for Windows | |
| on: push | |
| env: | |
| QT_VERSION: "6.6.1" | |
| MINGW_VERSION: "win64_mingw" | |
| MINGW_PATH: "mingw_64" | |
| BUILD_TYPE: Release | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Install correct version of Mingw | |
| uses: crazy-max/ghaction-chocolatey@v3 | |
| with: | |
| args: install mingw | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| host: windows | |
| target: "desktop" | |
| version: ${{ env.QT_VERSION }} | |
| arch: ${{ env.MINGW_VERSION }} | |
| dir: "${{github.workspace}}/qt" | |
| install-deps: "true" | |
| - name: Set Qt path for qmake | |
| run: | | |
| echo "D:/a/Cryptographer/Cryptographer/qt/Qt/6.6.1/mingw_64/bin" >> $GITHUB_PATH | |
| echo "D:/a/Cryptographer/Cryptographer/qt/Qt/6.6.1/mingw_64/bin" >> $GITHUB_ENV | |
| echo "D:/a/Cryptographer/Cryptographer/qt/Qt/6.6.1/mingw_64/bin" >> $env:QMAKE_PATH | |
| shell: powershell | |
| - name: Configure qmake Project | |
| working-directory: ${{github.workspace}} | |
| run: qmake -spec win32-g++ -o Makefile | |
| - name: Build project | |
| run: mingw32-make.exe | |
| - name: Compress portable program | |
| run: | | |
| mkdir ${{github.workspace}}\build\windows-deployed\ | |
| cp D:/a/Cryptographer/Cryptographer/release/Cryptographer.exe ${{github.workspace}}\build\windows-deployed\ | |
| cd ${{github.workspace}}\build\windows-deployed\ | |
| windeployqt6.exe Cryptographer.exe --release | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-deployed | |
| path: ${{github.workspace}}/build/windows-deployed |