feat: 功能微调和更新 #19
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 | |
| 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@v3 | |
| with: | |
| version: 6.6.2 | |
| host: 'windows' | |
| target: 'desktop' | |
| arch: 'win64_msvc2019_64' | |
| modules: 'qtactiveqt' | |
| cache: true | |
| - 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}} | |
| - 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@v2 | |
| 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 | |