build: 更新上游仓库; #28
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: CMake build release for win | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - release | |
| env: | |
| BUILD_TYPE: Release | |
| jobs: | |
| build-release: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: 'recursive' | |
| token: ${{ secrets.CONTRIBUTORS_TOKEN }} | |
| - name: Install Qt | |
| # Installs the Qt SDK | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: 6.10.0 | |
| host: 'windows' | |
| target: 'desktop' | |
| arch: 'win64_msvc2022_64' | |
| modules: 'qtactiveqt' | |
| cache: true | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install Inno Setup | |
| run: choco install innosetup -y | |
| - name: Add Chinese support file for InnoSetup | |
| run: | | |
| $sourcePath = "${{github.workspace}}/mkinstaller/innoSetup/ChineseSimplified.isl" | |
| $destinationPath = "C:\Program Files (x86)\Inno Setup 6\Languages\ChineseSimplified.isl" | |
| Start-Process powershell -ArgumentList "Copy-Item -Path '$sourcePath' -Destination '$destinationPath' -Force" -Verb runAs | |
| - name: Configure CMake | |
| # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
| # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
| run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWINGHEX_USE_FRAMELESS=ON -DWINGHEX_BUILD_TEST_PLUGIN=OFF -DWINGHEX_BUILD_SHARED_MEM_EXT=OFF -DWINGHEX_ANGEL_LSP=ON | |
| - name: Build | |
| # Build your program with the given configuration | |
| run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.8' | |
| cache: 'pip' | |
| - name: Install Python packages | |
| run: pip install -r ${{github.workspace}}/mkinstaller/innoSetup/requirements.txt | |
| - name: Deploy WingHexExplorer2 | |
| run: python ${{github.workspace}}/mkinstaller/innoSetup/mkinnopak.py --no-build "${{github.workspace}}/build" | |
| - name: Compile .ISS to .EXE Installer | |
| uses: Minionguyjpro/Inno-Setup-Action@v1.2.2 | |
| with: | |
| path: build/package/WingHexExplorer2/mkiss.iss | |
| options: /O${{github.workspace}}/mkinstaller/innoSetup | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: WingHexExplorer2-win-release-build-cache | |
| path: ${{github.workspace}}/mkinstaller/innoSetup/*.exe | |