Add GitHub Release step for tags #23
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: Build Windows | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: '6.4.2' | |
| arch: 'win64_msvc2019_64' | |
| - name: Setup MSVC | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Check Environment | |
| run: | | |
| cmake --version | |
| ninja --version | |
| - name: Build | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release | |
| cmake --build . --config Release | |
| windeployqt --release --qmldir ../src/ui appOpenIPC-Dashboard.exe | |
| - name: Prepare Dist | |
| run: | | |
| if (!(Test-Path dist)) { mkdir dist } | |
| copy build\appOpenIPC-Dashboard.exe dist\ | |
| copy build\*.dll dist\ | |
| xcopy build\plugins dist\plugins /E /I | |
| xcopy build\qml dist\qml /E /I | |
| xcopy build\translations dist\translations /E /I | |
| - name: Create Installer | |
| run: | | |
| choco install innosetup | |
| & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" setup.iss | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: OpenIPC-Dashboard-Windows | |
| path: | | |
| OpenIPC-Dashboard-Installer.exe | |
| dist/ | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: OpenIPC-Dashboard-Installer.exe |